#49907 [NEW]: PHP Gtk2 Widget can_default is undefined

From: Date: Sat, 17 Oct 2009 08:05:58 +0000
Subject: #49907 [NEW]: PHP Gtk2 Widget can_default is undefined
Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-4361@lists.php.net to get a copy of this message
From: chezmmd at gmail dot com Operating system: WinXP PHP version: 5.2.11 PHP Bug Type: PHP-GTK related Bug description: PHP Gtk2 Widget can_default is undefined Description: ------------ Unable to get GtkEntry to have focus after user selects a row in GtkTreeView on same screen w/o a grab_default. Widget->grab_default causes GtkCritical error w/o can_default (php.exe:2020 Gtk-CRITICAL gtk_widget_grab_default: assertion 'GTK_WIDGET_CAN_DEFAULT'(widget) failed. Widget->can_default causes PHP fatal error and crash. Reproduce code: --------------- <?php $button1 = new GtkButton('Default Test'); $button2 = new GtkButton('Extra Button'); $button2->can_default(TRUE); $vbox = new GtkVBox; $vbox->pack_start($button1, FALSE, FALSE); $vbox->pack_start($button2, FALSE, FALSE); $window = new GtkWindow; $window->connect_simple('destroy', array('gtk', 'main_quit')); $window->set_default_size(120,120); $window->add($vbox); $window->show_all(); $button2->grab_focus(); $button2->grab_default(); Gtk::main(); ?> Expected result: ---------------- Button has keyboard focus and no critical error for can_default property. Actual result: -------------- application crash. -- Edit bug report at http://bugs.php.net/?id=49907&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49907&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49907&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49907&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49907&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49907&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49907&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49907&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49907&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49907&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49907&r=support Expected behavior: http://bugs.php.net/fix.php?id=49907&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49907&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49907&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49907&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49907&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49907&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49907&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49907&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49907&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49907&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49907&r=mysqlcfg

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