RE: [PHP-GTK] Fatal error: Underlying object missing

From: Date: Sun, 16 Nov 2003 19:40:02 +0000
Subject: RE: [PHP-GTK] Fatal error: Underlying object missing
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4160@lists.php.net to get a copy of this message
Hi > Fatal error: Class 'gtkitementry' does not support overloaded > method calls in > /home/epplestun/Proyectos/GtkItemEntry/class.gtkitementry.php > on line 17 Overloading means to have the same function name with different types of parameters or a different number of parameters. In Java, you often have the choice to use a filename, a file object or an input stream for accessing a file on numerous functions. For this, 3 functions are defined like this: void readTheContent( String strFilename) {...} void readTheContent( File objFile) {...} void readTheContent( InputStream objIn) {...} On PHP this would be 3 times the same call, because you've got no types, not in php4. So the only reason is, that the function is already defined with a number of parameters, e.g. 2: set_text( $strText, $nAlignment) and you define set_text( $strText) this would be a overloading of the function set_text, and this is not possible. You've got to define the function with the same number of parameters. Regards/MfG, Christian Weiske <<<<<<<<<<<<<<>>>>>>>>>>>>>>>> Christian Weiske cweiske@cweiske.de www.cweiske.de <<<<<<<<<<<<<<>>>>>>>>>>>>>>>> Always forgetting birthdays? Try birthday reminder! http://www.cweiske.de/birthday.htm

« previous php.gtk.general (#4160) next »