Not profiling 'Delay>>wait'

David Farber dfarber at numenor.com
Thu Sep 27 15:35:39 UTC 2001


and if someone would bang out a quick haltOnShift, and stuff it in the
image, then it would be just sitting there waiting to be used too...

david


At 11:34 PM 9/26/01 -0700, you wrote:
>>>>>> "Doug" == Doug Way <doug.way at riskmetrics.com> writes:
>
>Doug> One thing you can do if you need to set a halt in a frequently called
>Doug> method is to define a global in a workspace such as:
>
>Doug> FirstHalt := true.
>
>Doug> And then in your Delay>>wait method, insert a halt like this:
>
>Doug> FirstHalt ifTrue: [FirstHalt := false.  self halt].
>
>Doug> This will only halt the first time it runs across this.  Another thing
>Doug> you can do is set up a shiftHalt method that checks to see if shift is
>Doug> pressed, but that's a bit more work.
>
>There's one of these in the image already!
>
>        ProtoObject>>doOnlyOnce:
>
>Go look!
>
>-- 
>Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
><merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
>Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
>See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
>
>
>
--
David Farber
dfarber at numenor.com




More information about the Squeak-dev mailing list