Last updated at 1:39 pm UTC on 25 August 2016
If a morph implements a method
#step, then that method will be called once every second (see Morph method stepTime) as long as it is open in an active morphic world. To change the update period, modify the method
#stepTime to return a different number of seconds.
This has been extended recently in Squeak 3.1. Anyone care to describe the extensions? Nowadays, you can have multiple step timers...
One twist on
#step is that the model of a SystemWindow can also be stepped. The relevant methods are
The primary use of
#step is probably to make animated morphs which update their appearance periodically. However, it is a general mechanism that allows some interesting designs. In particular, anywhere that a thread would normally be used, one can consider polling from
#step instead. The downside is that there is more latency between polls; the upside is that the method has no synchronization worries, and in particular it can freely make changes to the current morphic world.