Block freezing during execution (project change)
C. David Shaffer
cdshaffer at acm.org
Tue Oct 12 21:13:04 UTC 2004
In Keymapping I have a block action which looks something like this:
[Project enter: 'SomeOtherProject']
This block executes when the user presses a certain key. The problem
I'm having is that once this block executes Squeak forever thinks it is
"still being evaluated". That is, pressing the keyboard shortcut again
results in an exception with the message:
"Attempt to evaluate a block that is already being evaluated."
I verified that statements added to the end of this block never execute
so it seems like jumping from project to project suspends the evaluation
of certain threads (maybe something to do with this being done in
response to an event?). However this can't be completely true b/c
re-entering the original project does not cause the block to finish
being evaluated. So, here's what I do currently:
[WorldState addDeferredUIMessage: [Project enter: 'SomeOtherProject']]
and all is well. I'd prefer not to have to do this since it makes these
keymap entries confusing to users. Also, just out of curiousity I'd
like to understand what is going on. So, can anyone offer an
explanation for what I'm seeing (or even a hint as to how to avoid using
addDeferredUIMessage:)?
David
More information about the Squeak-dev
mailing list
|