Re: Re-setting the callback function from within ... the callback function?
- From: Havoc Pennington <hp redhat com>
- To: Chris Quinn <cq htec demon co uk>
- Cc: gtk-list gnome org
- Subject: Re: Re-setting the callback function from within ... the callback function?
- Date: 13 Apr 2001 17:24:42 -0400
Chris Quinn <cq htec demon co uk> writes:
> It seems that while a handler has yet to return, attaching another
> handler for the same signal causes the new handler to immediately
> receive the signal that came from originally pushing the
> button. Thus the code below endlessly prints out "pressed..." once
> the button is clicked.
>
The problem is simply a misfeature, which is that if you append
handlers to the list of handlers during the emission, they will be
invoked (since the emission is still in progress, and will be until
the list of handlers is exhausted).
> So my question is: is there a way upon entering a handler to stop
> the widget emitting a signal(or perhaps all signals) while a new
> handler is being installed, reactivating the widget afterwards?
You could use gtk_signal_handler_block() perhaps.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]