Dumps core when calling gtk_dialog_run() from a focus_out_event handler



Hi,

I am using a GtkEntry to get input from the user and
I have connected to the focus_out_event signal so that
I can validate the text typed into the GtkEntry when the
focus leaves the GtkEntry.

>From within the focus_out_event handler, I am displaying
a modal dialog box using the gtk_dialog_run() function.

This results in a core dump at run time when the focus
leaves the GtkEntry.

I receive the following Gtk messages :

Gtk-WARNING **: GtkEntry - did not receive focus-out-event. If you
connect a handler to this signal, it must return
FALSE so the entry gets the event as well

Gtk-ERROR **: file gtkentry.c: line 4205 (blink_cb): assertion failed:
(GTK_WIDGET_HAS_FOCUS (entry))
aborting...


Is it appropriate to show a modal dialog box from the focus_out_event
handler ?


Regards,

Scott.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]