Some strange errors in lastest from CVS

From: Date: Wed, 10 Aug 2005 14:42:27 +0000
Subject: Some strange errors in lastest from CVS
Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-1546@lists.php.net to get a copy of this message
Hello, Some strange action in the lastest php-gtk2 from CVS : - We get an GtkProgress when doing an "new GtkProgressBar" - We get Critical Error when construct GtkAdjustment I known GtkProgressBar doesn't need GtkAdjustment but I get this message : (test.php:23073): Gtk-CRITICAL **: gtk_progress_bar_new_with_adjustment: assertion `GTK_IS_ADJUSTMENT (adjustment)' failed If I don't pass an GtkAdjustment Hope this help to improve php-gtk2 See you Nicolas. Here the sample script : <? if (!class_exists('gtk')) dl( 'php_gtk2.' . (strstr( PHP_OS, 'WIN') ? 'dll' : 'so')); $wd = new GtkWindow(GTK_WINDOW_TOPLEVEL); $adj = new GtkAdjustment(0, 0, 100, 1, 10, 0); $progress = new GtkProgressBar($adj); $progress->set_size_request(360, 20); $wd->add($progress); $wd->show_all(); function changebar() { global $pourcent, $progress, $adj; if ($pourcent == 100) $pourcent = 0; else $pourcent++; $adj->set_value($pourcent); $progress->set_value($pourcent); Gtk::timeout_add(1000, changebar); echo "change to $pourcent\n"; } Gtk::timeout_add(1000, changebar); Gtk::main(); ?> Here the result : [root@toad tmp]# php test.php (test.php:23066): GLib-GObject-CRITICAL **: g_value_set_float: assertion `G_VALUE_HOLDS_FLOAT (value)' failed (test.php:23066): GLib-GObject-CRITICAL **: g_value_set_float: assertion `G_VALUE_HOLDS_FLOAT (value)' failed (test.php:23066): GLib-GObject-CRITICAL **: g_value_set_float: assertion `G_VALUE_HOLDS_FLOAT (value)' failed (test.php:23066): GLib-GObject-CRITICAL **: g_value_set_float: assertion `G_VALUE_HOLDS_FLOAT (value)' failed (test.php:23066): GLib-GObject-CRITICAL **: g_value_set_float: assertion `G_VALUE_HOLDS_FLOAT (value)' failed (test.php:23066): GLib-GObject-CRITICAL **: g_value_set_float: assertion `G_VALUE_HOLDS_FLOAT (value)' failed PHP Warning: GtkProgress::set_value() is deprecated: use GtkProgressBar in /tmp/test.php on line 24 Warning: GtkProgress::set_value() is deprecated: use GtkProgressBar in /tmp/test.php on line 24 change to 1 PHP Warning: GtkProgress::set_value() is deprecated: use GtkProgressBar in /tmp/test.php on line 24 Warning: GtkProgress::set_value() is deprecated: use GtkProgressBar in /tmp/test.php on line 24 change to 2

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