Re: Type to store anything in a GtkTreeStore/GtkListStore

From: Date: Tue, 22 Nov 2005 05:13:33 +0000
Subject: Re: Type to store anything in a GtkTreeStore/GtkListStore
References: 1 2 3  Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-2085@lists.php.net to get a copy of this message
Should be fixed in CVS. -Andrei On Nov 21, 2005, at 3:04 PM, Christian Weiske wrote:
Andrei,
Gtk::TYPE_PHP_VALUE is supposed to be able to store anything. What sort of problems do you run into with it?
Just execute the following: <?php $store = new GtkListStore(Gtk::TYPE_PHP_VALUE); //Problem 1: simple data types $integer = 0; $store->append(array($integer)); //Problem 2: Widgets $window = new GtkWindow(); $store->append(array($window)); ?> Output: ======================= PHP Warning: Cannot set row: type of element 0 does not match the model in /data/php-gtk/two/problems/gtktreestore.phpw on line 6 PHP Warning: Cannot set row: type of element 0 does not match the model in /data/php-gtk/two/problems/gtktreestore.phpw on line 10 ======================= That damn thing bloated up my Gtk_VarDump2 code.... --Regards/MfG, Christian Weiske


« previous php.gtk.dev (#2085) next »