Step Determining whether to continue processing

After calling the first event handler, wxPy-thon checks to see if further processing is requested. The event handler asks for more processing by calling the wx.Event method Skip(). If the Skip() method is called, processing continues and any handlers defined in the superclass are found and executed in this step. The Skip() method can be called at any point in the handler, or any code invoked by the handler. The Skip() method sets a flag in the event instance, which wxPy-

Event

handler

1

T

Figure 3.7 The event handler calls Skip() and processing continues

Figure 3.7 The event handler calls Skip() and processing continues thon checks after the handler method is complete. In listing 3.3 the OnButton-Click() doesn't call Skip(), so in that case the event process is complete at the end of the handler method. The other two event handlers do call Skip() so the system will keep searching for a matching event binding, eventually invoking the default functionality for mouse enter and leave events for the native widget, such as mouse-over events.

Was this article helpful?

0 0

Post a comment