Re: GtkMenu ?
| From: | Andrei Zmievski | Date: | Mon, 16 Jul 2001 17:39:51 +0000 |
| Subject: | Re: GtkMenu ? | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-2213@lists.php.net to get a copy of this message | ||
On Mon, 16 Jul 2001, Jonas Delfs wrote:
> No - i tried with the classname, as you suggested.
> But i tried that now - without luck. Now i get this error-msg when cliking on
> "New"(that call newFileInst()) in my menu:
> <br>
> <b>Warning</b>: gtklabel() expects argument 1 to be string, integer given in
> <b>c:\backup\PROGRA~1\php-gtk\edit4-f\edit4-f.php</b> on line
> <b>78</b><br>
> <br>
> <b>Fatal error</b>: Call to a member function on a non-object in
> <b>c:\backup\PROGRA~1\php-gtk\edit4-f\edit4-f.php</b> on line
> <b>79</b><br>
>
> The call to gtklabel() is in newFileInst() - why does PHP-Gtk give newFileInst() a integer as
> an argument (it have to do, because i have defined my function with 'function
> newFileInst($fileName='Not named*'){' and gtklabel() gets called with $fileName as
> argument). The only integer i can find is the 0 that is given i the item-array. - It just do not
> help to change 0 to a string i the array-definition.
> About the second error-msg mentioned above, line 79 looks like this:
> $this->gui['label']->show();
> And the line just above this line, looks like this:
> $this->gui['label'] = new GtkLabel($fileName);
>
> I hope i got it out right.
What does your item factory definition look like?
-Andrei
* Only 19,999 lines of C++ to my next ski trip... *