On Thursday 04 October 2001 05:06 pm, Doug Way wrote:
Looking at this (and our earlier exchanges), and noticing that we're trying to find a place to hang a method which is always passed a block... now I'm thinking that the best way to handle it would be to add an instance method to BlockContext, so that the usage becomes simply:
[self halt] doOnlyOnce.
(Or, in keeping with other BlockContext methods, maybe #valueOnlyOnce. But somehow #doOnlyOnce seems better.)
The #rearmOneShot method would become a class method for BlockContext.
And, of course, the doOnlyOnce should have a flag per block, rather than a global flag, so you can have more than one of them.