The GMRegisterKeyEventsAcceptance is a pretty good example to see how to use the GMKeyHandler class. While it might obvious to developers that have some experience with Squeak, it could help to add a short comment in the initialize method to point out that you need to call gmEvaluateRegisteredEvents in the step method, e. g.:
First of all, we need to specify that this Morph should listen to keyboard input. We use our GMKeyHandler (gmRegisterToKeyHandler), because it is plattorm independent. You will also have to call gmEvaluateRegisteredEvents in the step method. Have a look at it for more information.
The
GMRegisterKeyEventsAcceptance
is a pretty good example to see how to use theGMKeyHandler
class. While it might obvious to developers that have some experience with Squeak, it could help to add a short comment in theinitialize
method to point out that you need to callgmEvaluateRegisteredEvents
in thestep
method, e. g.: