#doOnlyOnce (was Re: [BUG] '3 + 4' crashes Squeak ...)

Ned Konz ned at bike-nomad.com
Fri Oct 5 00:40:13 UTC 2001


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.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com




More information about the Squeak-dev mailing list