3 messages in org.gnome.gtk-perl-listGtkEntry - did not receive focus-out-...
FromSent OnAttachments
Daniel KasakSep 21, 2005 7:30 pm 
muppetSep 21, 2005 10:34 pm 
Daniel KasakSep 21, 2005 10:55 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:GtkEntry - did not receive focus-out-event.Actions...
From:Daniel Kasak (dka@nusconsulting.com.au)
Date:Sep 21, 2005 7:30:34 pm
List:org.gnome.gtk-perl-list

Greetings.

I've hit somewhat of a brick wall with the error:

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 at /usr/lib/perl5/site_perl/5.8.5/Gtk2/Ex/Dialogs/Message.pm line 236. Gtk-ERROR **: file gtkentry.c: line 4857 (blink_cb): assertion failed: (GTK_WIDGET_HAS_FOCUS (entry)) at /usr/lib/perl5/site_perl/5.8.5/Gtk2/Ex/Dialogs/Message.pm line 236. Aborted

which results in my app completely bailing out.

What's happening is that I've connected some code to run on the focus-out event of an entry:

sub on_Prospects_Search_LeadNo_focus_out_event { my $leadno = $prospects->get_widget("Search_LeadNo")->get_text; $prospect_data->query("where LeadNo=$leadno"); return FALSE; }

That return FALSE bit I added just now - it didn't help any.

I'm getting into the line:

$prospect_data->query("where LeadNo=$leadno");

From here, my Gtk2::Ex::DBI module is throwing an error ( because I've mucked up the SQL ... but that's my problem ) via Gtk2::Ex::Dialogs. The bit of code that does this is:

eval { $sth->execute || die $self->{dbh}->errstr; };

if ($@) { Gtk2::Ex::Dialogs::ErrorMsg->new_and_run( title => "Error in Query!", text => "DB Server says:\n$@" ); return FALSE; }

I get the error message, but as soon as it appears, the whole app crashes with the above error. What's going on? Where do I have to return FALSE to stop this from happening?