Glade & Streams

From: Date: Sun, 09 Apr 2006 14:40:33 +0000
Subject: Glade & Streams
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6854@lists.php.net to get a copy of this message
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

« previous php.gtk.general (#6854) next »