[Newbies] Stef, BotsInc problem...

David Mitchell david.mitchell at gmail.com
Tue Jan 23 03:19:55 UTC 2007


David Urquhart wrote:

>
> Hi Blake
>
> I could be well off base here - I'm a beginner too!
>
> Bert told me... "doOnlyOnce:" is essential for not getting a gazillion 
> of debuggers.  Read its comment to learn how to rearm it.
>
> Here's how Bert suggested it be used with 'halt'.
>
> self doOnlyOnce: [self halt].
>
self halt. is usually OK by itself (certainly for the beginning bots inc 
stuff). doOnlyOnce is particularly useful for debugging GUI event code 
that would otherwise keep firing (or really for debugging in a loop).

> As for why the system keeps running I can only suggest that its by 
> design.  Squeak is different to other languages because its actually 
> an environment, and a remarkable environment with 'late binding' such 
> that objects (classes and instances) can be dynamically changed during 
> runtime.  So you can debug - actually change code - without stopping 
> the system.

That's true enough, but the stack you are debugging shouldn't continue.

Unfortunately, I can't think what might be wrong. I've gone through Bots 
Inc without hitting this one.


More information about the Beginners mailing list