Re: Using Glade with PHP-GTK
| From: | James Cameron | Date: | Sat, 15 Nov 2003 10:00:56 +0000 |
| Subject: | Re: Using Glade with PHP-GTK | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-4150@lists.php.net to get a copy of this message | ||
Yes, it could be misleading. Glade doesn't have a code generator for
PHP, instead your PHP code is expected to load the XML file that Glade
uses as the project file.
Your PHP code might look this;
# utility functions, instantiate a window from widget tree
function open_window($name) {
global $xml;
$gx = &new GladeXML($xml, $name);
$gx->signal_autoconnect();
return $gx;
}
Where $xml is the file name of the XML file, whatever.glade, and $name
is the top level widget to be displayed.
http://quozl.netrek.org/pptp/php-gtk/ has an
example, in case you want
to see how it works.
--
James Cameron mailto:quozl@us.netrek.org http://quozl.netrek.org/