|
You can handle an event on any object by attaching an event handler.
This is done using the expression
{on e:Event at g:Graphic do ...}
or by calling add-event-handler. Events
created in this way for a specific instance of a graphic are
called "dynamic event handlers."
Many events have a corresponding method called the "static event
handler." After the dynamic event handlers are executed for an
object, the object's static event handler method is called.
By convention, definitions of this method should also include a call
to the superclass's static event handler method, so all static event
handler methods in the class hierarchy for this event type will be called.
|