Re: Re-setting the callback function from within ... the callback function?



Havoc Pennington wrote:
>
> 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).
> 
[snip]
> You could use gtk_signal_handler_block() perhaps.

Thanks for the suggestion. Unfortunately it isn't the signal just emitted that needs blocking but the next, which doesn't exist until a callback is attached by which time it is too late!

I note that my version is 1.2.5. But I guess your 'misfeature' comment relates to the latest version. Do you know if it will it remain a misfeature, especially if, as it appears to me, it hinders implementation in the Continuation Passing Style, a style prevalent in the functional programming community (I myself am using an ML binding of the gtk calls)? If it is to remain, what are the chances of success hacking a fix into the source myself?

Thanks,
Chris




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