[pygtk] Problem with Notebook - stop-emission doubts
Alessandro Dentella
sandro at e-den.it
Sat Dec 27 01:28:23 WST 2008
On Wed, Dec 24, 2008 at 01:22:49PM +0100, Gian Mario Tagliaretti wrote:
> On Wed, Dec 24, 2008 at 9:57 AM, Frédéric
> <frederic.mantegazza a gbiloba.org> wrote:
>
> > PS: BTW, where did you find the stop_emission() method? I can't retreive it
> > in the doc...
>
> it a gobject method:
> http://library.gnome.org/devel/pygobject/stable/class-gobject.html#method-gobject--stop-emission
following the docs I have several questions?
1. the explanation is exactly the same as for "emit_stop_by_name": which
is the difference?
"""
The stop_emission() method stops the current emission of the signal
specified by detailed_signal
"""
2. "current emission" means the emission of the signal that is now
handled? if this is the case, what's the need for specifying the name?
3. How is it different from returning True?
I tested it with::
b = gtk.Button("Press me")
e = gtk.Entry()
b.connect('clicked', self.on_clicked1)
b.connect('clicked', self.on_clicked2)
e.connect('key-press-event', self.on_key_press_event1)
e.connect('key-press-event', self.on_key_press_event2)
on_clicked2 cannot be inhibited returning True from on_clicked1 while
on_key_press_event1 *can* be inhibited simply returning True.
Both can be inhibited using stop_emission.
Thanks
sandro
*:-)
More information about the pygtk
mailing list