[Wxsqueak] Re: Putting halts in event handlers
Rob Gayvert
rtg at rochester.rr.com
Tue Dec 19 18:50:51 UTC 2006
dan wrote:
>
> If you get an exception in the callback, it seems like you catch it and
> ignore it, right?
It's not entirely ignored -- the callback is "completed" by restoring
the C stack, and then it opens a debugger on the Squeak callback
process. If it's a one-shot deal, this can be useful. But in a case like
this tree item comparison, it can be a mess. The bottom line is that you
have to be very careful with what goes on in a callback.
> We have been discussing callbacks in the general squeak list. It looks
> like you have done some interesting stuff regarding putting callback
> support into the VM. Is that right?
I can't claim to have invented anything new (the ideas are all from
Andreas), but the end result is interesting. In the 0.4 release, the
callbacks were handled entirely within WxPlugin, without any core VM
support. The downside of this was that the callback processes were hard
to control, so any API call that might result in a nested callback had
to be guarded with a special semaphore. In 0.5, I'm using Andreas' new
VM modifications, which makes the calls much cleaner, and should be more
stable as well.
.. Rob
More information about the Wxsqueak
mailing list