Re: Getting 'Data' from Glade 'Signals' tab, GladeXML global
| From: | Steph | Date: | Sun, 12 Jan 2003 07:29:16 +0000 |
| Subject: | Re: Getting 'Data' from Glade 'Signals' tab, GladeXML global | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-2895@lists.php.net to get a copy of this message | ||
Please, try coding in PHP-GTK by hand before you start using Glade...
----- Original Message -----
From: "php-gtk User" <php-gtk@ragweed.net>
To: <php-gtk-general@lists.php.net>
Sent: Sunday, January 12, 2003 4:50 AM
Subject: [PHP-GTK] Getting 'Data' from Glade 'Signals' tab, GladeXML
global
> First question:
>
> I'd like to write a function that incorporates the Data present in the
> 'Data' field within the Glade widget property 'Signals' tab (the one
> with the tooltip, "The data passed to the handler").
>
> I'm trying to write a (single, reusable) handler to update an
arbitrary
> Entry widget by passing it the Object name and the Text to update it
> with.
>
> function update_entry($widget_name, $text) {
> $widget_name->set_text($text);
> }
>
> Suggestions are appreciated. Especially if they contain URLs or
> examples. "RTFM" is acceptable if accompanied by the above. The above
> code is only a rough guess.
>
> Second question:
>
> More PHP-related, I suppose, but I've got the following:
>
> $gx = &new GladeXML('gui.glade');
>
> Is there a cleaner way to keep $gx global than declaring, 'global
$gx;'
> within every function that needs access to the GladeXML object?
> $GLOBALS["gx"] is a bit ugly.
>
> Thanks again.
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>