> The tricky bit here is that you don't want to make the system
> vulnerable to broken clients of the notifications.
Yes. That's why you really want to have asynchronous notifications
instead of synchronous callbacks. Unfortunately, Squeak doesn't have
any system-level support for those (in Morphic, you could schedule the
action in the form of a morphic alarm for the next world cycle but
that won't work if your client is not Morphic).
> I managed to hose an image by installing a client that
> caused a MNU error after method compilation, but before
> the installation of the compiled method. It may be that
> all I needed was to evaluate the action with an ensure:
> block, but I'm not sure that's bulletproof.
It's definitely not bullet-proof as it may open a debugger (and at this
point it can be too late already). If you handle the errors silently
(e.g., using some catch-all rule) you may be better off but it's
still a hard problem as things may screw up while the callback is
completing (in particular if there has been some error along the way).
Most code in this area is written under the assumption of being run
atomically so whatever hooks in there can cause some severe problems.
Cheers,
- Andreas