Thanks Christoph, detailed response interleaved below.
Christoph Thiede wrote
Hi Chris,
usually, 'self halt' stops the execution of the current process indeed, as you can try out by typing the following into a workspace and doing it:
self halt.
self inform: 'Hello world'
On this system, the 'Hello World' message appears at the same time as the error window triggered by the 'halt' message.
You will see that you need to proceed the debugger window in order to get the Hello World message.
However, Squeak also supports multiprocessing, and it is possible that any code or tool you are using executes your method each time in a separate process. Here is a simple example of multiprocessing:
[self halt] fork.
self inform: 'Hello world'
You can see that the debugger opens, but the Hello World message is shown at the same time. This is because the #fork message created a new process that is running parallel to the first process. The halt message then only interrupts this second process.
Yes, that's what happens.
I don't know your exact code and tools, but that seems a logical explanation to me. If you use a tool that enforces multiprocessing, you might take a look at the Semaphore class to synchronize the different method executions.
Hmm, that looks a bit deep for me at the moment. I suppose this is just one of the inconsistencies that come out when following the Robots book. Pity the image pointed to on the apress website isn't entirely consistent with the pdf text on there.
I hope I understood your issue correctly, have much fun with Squeak!
Best,
Christoph
-- Sent from: http://forum.world.st/Squeak-Beginners-f107673.html