Hi,
What is the Squeak code I need to do before I send value to the protected block so that it can be re-evaluated?
It's not so easy since you're in a handler response. What you need is to make sure that the retry response cleans up the caller stack up to the #value message sent to the block so that the block is not recursively executed. The way I did this in my little exception exercise was to use something like:
ExceptionHandler>>executeBlock: doBlock marker: marker
retryBlock := [^marker]. ^doBlock value.
retryBlock is the block that's been executed on Exception>>retry and the #on:do: method was then actually done by the handler as some sort of
[result := self executeBlock: doBlock marker: marker. result == marker] whileTrue.
The non-local return cleans up the stack here so you don't send #value recursively to the block. It's a little tricky ;-)
Andreas
squeak-dev@lists.squeakfoundation.org