[Webteam] Fixed: "Error: Attempt to evaluate a block that is
already being evaluated"
Ken Causey
ken at kencausey.com
Sat Oct 16 21:45:25 UTC 2010
Janko,
That error "Error: Attempt to evaluate a block that is already being
evaluated" came up again and so I decided to take a look. I'm almost
certain the cause is that you defined a #startUp method on SpEnvironment
class that is meant to be executed whenever the image starts up. This
is fine and good except that the way this mechanism works a message
#startUp: with a boolean argument indicating whether or not this is a
true startup (aka resuming) indicated by true, or whether this is simply
after a snapshot is made, indicated by false, is sent. Sort of odd I
guess but the same mechanism is used for quitting and snapshotting.
Behavior defines #startUp: to simply send #startUp and so your existing
implementation worked but it was also being called after a snapshot and
not a true restart.
So I defined #startUp: on SpEnvironment class that only takes the action
if the argument is true. I left the old #startUp for now, though it
should no longer be used and I left a browser open on the added method
so you can look at it and modify as appropriate if you like. I did not
update any packages so you will want to take care of that also.
Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
Url : http://lists.squeakfoundation.org/pipermail/webteam/attachments/20101016/2a270796/attachment.pgp
More information about the Webteam
mailing list