SIGNAL LAB — A NATIVE SQUEAK STATE MACHINE

Tested on Squeak 6.1, 64-bit image build 23976, on Linux.
Educational signal illustration, not a real traffic controller.
The new classes are native-only and are not installed in the site's embedded browser image.

QUICK START
1. Open a copy of your Squeak 6.1 learning image.
2. In File List, select state-machines-final.st and choose fileIn.
3. In a Workspace, evaluate: LSSignalApp open

The .st files use Smalltalk chunk format. Do not paste a whole file into a Workspace.
The source installs classes without automatically opening a window.
Run/pause/reset controls are native Morphic buttons.
Next state skips logical time; Tick consumes one tick.
Normal logical durations: red 3, green 4, amber 2, crossing 2.
Request crossing queues one event. It branches at the red boundary; requests during crossing are ignored.
Run one cycle stops at the next amber-to-red boundary, including the current partial cycle.
Close the window to unregister its scheduler. Reopening the same app preserves its model but starts paused.

CHECKPOINTS
state-machines-01.st through state-machines-08.st are cumulative full source.
Close the existing Signal Lab window before filing in a checkpoint.
Move forward, or use a fresh image to return to an earlier stage: old file-ins do not remove newer methods.
Each checkpoint was independently loaded from the same unsaved clean baseline image.
The lesson's exact Workspace blocks were executed, and all 26 displayed method snippets were compiled.

APPLICATION TESTS
File in state-machines-final.st, then state-machines-tests.st.
Workspace -> Print it: LSSignalTest suite run
Expected: 41 runs, 41 passes, zero failures, zero errors.
The suite includes a real scheduler callback test and native mouse-button event dispatch.

EXERCISES
File in final source first, then state-machines-exercise-1.st and state-machines-exercise-2.st.
File in state-machines-exercise-tests.st.
Workspace -> Print it: LSSignalExerciseTest suite run
Expected: 5 runs, 5 passes, zero failures, zero errors.
Exercise 1 predicts ticks until green without changing the model.
Exercise 2 delegates a one-field configuration change to the existing atomic validator.

CAPTURE PROVENANCE
PNG files are native Squeak window imageForm captures written by PNGReadWriter.
The GIF is an edited sequence of 30 native frames with deliberate viewing delays.
Its script dispatches genuine Morphic button events and invokes the app's actual step callback.
It does not claim to be a real-time screen recording. Logical ticks, not wall time, drive the model.
No JavaScript recreation or fabricated UI is used.

CLEANUP
Pause or close the window. Save source separately from your image.
To remove classes, close all Signal Lab windows first, then remove category LearnSqueak-StateMachines.
