[Vm-dev] Progress changes break VMMaker
kosi.balazs at ezomer.hu
Sat Jun 23 12:18:41 UTC 2012
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
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.
More information about the Vm-dev