Re: Glade & Streams
| From: | Steph Fox | Date: | Sun, 09 Apr 2006 15:12:18 +0000 |
| Subject: | Re: Glade & Streams | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6855@lists.php.net to get a copy of this message | ||
Hi Sean,
Try not telling GladeXML::new_from_buffer about strlen($glxml) and let us know how you get on. The way we have it defined in the wrapper, it's picking that up as the 'root' parameter, which is probably why you're seeing that error. Probably.
- Steph
----- Original Message ----- From: "Sean Coates" <sean@caedmon.net>
To: <php-gtk-general@lists.php.net>
Sent: Sunday, April 09, 2006 4:40 PM
Subject: [PHP-GTK] Glade & Streams
Hi again. I'm trying to package up a small PHP-GTK2 app into a .phar. This is almost working, but I'm having trouble with the Glade side. The GladeXML constructor doesn't seem to be stream-friendly. If I do $gl = new GladeXML('phar://srcview.glade'); an exception is thrown; 'could not construct GladeXML object' in phar://srcview.phar/source_viewer.php:91 This leads me to believe that the filename is passed off to libglade (or whatever) without being interpreted as a stream. So, this lead me to try an alternative method: $glxml = file_get_contents('phar://srcview.glade'); $gl = GladeXML::new_from_buffer($glxml, strlen($glxml)); This gives: (srcview.phar:2960): libglade-CRITICAL **: glade_xml_build_interface: assertion `wid != NULL' failed object(GladeXML)#1 (1) { ["filename"]=> NULL } Which seems ok on the surface, but I can't actually ->get_widget on any known widget. So, am I right? Is there a problem with streams and also new_from_buffer()? Or am I just screwing up the .phar/stream? S -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __________ NOD32 1.1380 (20060125) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com