|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-10-18 14:08 UTC] auroraeosrose@php.net
[2009-10-26 01:00 UTC] php-gtk-dev at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 04:00:01 2025 UTC |
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.