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].

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.

Of course you may WANT to stop the system because defective code could be dangerous - but that would be different to what should be default behaviour for a debugger in the context of Squeak. To actually stop your code you'd have to send it a message that it can handle I guess :) You'd need a 'freeze' method.

Dave


DAVID URQUHART




From: Blake <[EMAIL PROTECTED]>
Reply-To: "A friendly place to get answers to even the most basic questionsabout Squeak." <beginners@lists.squeakfoundation.org> To: "A friendly place to get answers to even the most basic questions aboutSqueak." <beginners@lists.squeakfoundation.org>
Subject: [Newbies] Stef, BotsInc problem...
Date: Mon, 22 Jan 2007 14:47:27 -0800

Stef,

I'm doing the Bots Inc thing with my son and we have a problem on the debugging section. When we code

self halt.

        That brings up the debugger and then continues. It doesn't halt!

Done inside the 4 timesRepeat loop, it brings up four debuggers, all useless because the program keeps going and terminated before you can do anything with it.

        Anyone have any ideas?

        ===Blake===
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to