GladeXML('filename.glade') Works on Win2000
| From: | William | Date: | Wed, 18 Sep 2002 05:06:56 +0000 |
| Subject: | GladeXML('filename.glade') Works on Win2000 | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-2421@lists.php.net to get a copy of this message | ||
I noticed a few other people having trouble getting a .glade file to work
on windows..
I kept getting the error:
>Fatal error: Cannot instantiate non-existent class: gladexml in
gladeLoginForm.php on line 5
When trying to run:
<?
$glade = &new GladeXML('phploginform.glade');
$glade->signal_autoconnect();
gtk::main();
?>
Then I realized the example on conf.php.net didn't load the php-gtk
extension at the top of the script. :)...After adding these top two lines it
worked perfectly
<?
//LOAD PHP-GTK Extension
$extension = "php_gtk" . (strpos(PHP_OS, "WIN") >= 0 ? ".dll" :
".so");
dl($extension);
$glade = &new GladeXML('phploginform.glade');
$glade->signal_autoconnect();
gtk::main();
?>
Hope that helps someone,
William.