[Glade-users] FW: about dialog box




Could anybody help with the question bellow?
Thanks much.
 
Arthur.
 


From: ashats at hotmail.com
To: glade-users at lists.ximian.com
Date: Tue, 7 Sep 2010 20:42:12 +0000
Subject: [Glade-users] about dialog box




I am using Glade-2 and C code. I am doing input validation after leaving an entry field. I put the validation 
inside _focus_out_event handler. Now, upon leaving the field, if it fails validation, I want to display a 
dialog box. So inside _focus_out_event handler I do the following:
 
text = lookup_widget(widget, "myField");
if (input_invalid(text)) {
  dialog1 = create_dialog1();
  gtk_dialog_run (GTK_DIALOG(dialog1));
  gtk_widget_hide(dialog1);
  gtk_widget_grab_focus(text);
}
return FALSE;
 
but it gives me the following errors at run time:
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 5287 (blink_cb): assertion failed: (GTK_WIDGET_HAS_FOCUS(entry)).
 
Any idea what I am doing wrong and how to fix it?
 
Thanks much.
Arthur.

_______________________________________________ Glade-users maillist - Glade-users at lists.ximian.com 
http://lists.ximian.com/mailman/listinfo/glade-users                                       
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20100908/4bbb604f/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001
Url: http://lists.ximian.com/pipermail/glade-users/attachments/20100908/4bbb604f/attachment.pl 




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