Re: multiple handlers binded to one signal don't work





2010/5/7 Xi Yang <jiandingzhe msn com>
The second handler just won't work.

The C documentation [1] tells that you have to return TRUE to stop the signal emission. That's what you are doing and you're doing :)

Return FALSE and you will have your expected behavior.

[1] http://library.gnome.org/devel/goocanvas/unstable/goocanvas-goocanvasitem.html#GooCanvasItem-button-press-event

sub on_press_1 {
ÂÂ Âprint "on press 1\n";
ÂÂ Âreturn TRUE;
return FALSE;
}

sub on_press_2 {
ÂÂ Âprint "on press 2\n";
ÂÂ Âreturn TRUE;
return FALSE
}
Â
--
Emmanuel Rodriguez


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