Watch the videos and practice
Transcript show: 'x = ', x printString ...
Halt now.
Halt now (or self halt)
...
Halt once.To enable it, evaluate
Halt enableHaltOnce
Halt once, if enabled :
Halt onCount: 10if: aSelector stops when invoked from a aSelectorif: aBlock stops if the block evaluates to true
faces will stop only when invoked from printString
Dice >> faces
...
Halt if: #printString
The parameter passed to if: can be a test name too:
Dice >> faces
...
Halt if: #testLargeDice
faces will stop only when invoked from testLargeDice
now, once, onCount: and if: are methods in Halt classHalt class >> between: minTime and: maxTime
(Time current
between: minTime asTime
and: maxTime asTime)
ifTrue: [ self signal ]
Dice >> faces
...
Halt between: '00:00' and: '02:00'
faces will halt only between midnight and 2am.
/