[Vm-dev] Progress changes break VMMaker

Balázs Kósi kosi.balazs at ezomer.hu
Sat Jun 23 12:18:41 UTC 2012


Hi,

Executing your example, these things happen:

 - String >> displayProgressFrom:to:during: throws a
ProgressInitiationException, which is a Notification
 - Your handler block passes that notification
 - It executes its defaultAction, which includes executing the during block

So the problem is that execution of the during block happens outside
your Notification handling.

Btw the comment of ToolBuilder-Kernel-cmm.52 says:
"Fix ability to safely catch Notification so that, if
#displayProgressAt:from:to:during:  is sent, will actually execute the
during block."

It would be help to see, what situation was fixed by this change. It's
still not entirely safe to catch Notifications  around display
progress calls. E.g. if you send #resume: to the Notifications you
catch, the during block won't run.

A quick fix, at least for the example, is to move the Notification
handling inside the during block.
Another is to change the superclass of ProgressInitiationException
from Notification to Exception.

Cheers, Balázs


More information about the Vm-dev mailing list