Re: [gtk-list] Re: gnome-perl: signal_connect_after
- From: Paolo Molaro <lupus lettere unipd it>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: gnome-perl: signal_connect_after
- Date: Fri, 21 Jan 2000 18:47:48 +0100
On Wed, Jan 19, 2000 at 12:06:47PM -0600, Noonian wrote:
> Here's a snippet of the relevant section (the 'activate' handler is
> commented out since I found the spacebar was triggering it when I added the
> key_press_event handler; i now call the activate handler explicitly from
> the key_press_event handler on a Return keypress):
>
> sub new {
> #...
> $input_line->signal_connect_after('key_press_event',
> \&input_key_pressed_event,
> $self);
> # $input_line->signal_connect('activate', \&input_line_activated,
> $self);
> #...
> }
>
> #...
>
> sub input_key_pressed_event {
> my ($entry, $self, $event) = @_;
>
> print "key pressed!\n";
[..]
> return 0;
> }
This is a problem with the return value of signal handlers:
that last one overwrites whatever the previous handlers returned.
Note that this is a general problem, not related to the perl binding.
You should return TRUE if you handle the event and don't want
it to propagate, check the documentation and/or the mail archives.
It doesn't seem you need connect_after() here though, so you better
use a simple connect().
lupus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]