Reference MWAPI

Event Processing

This section extends the topic of event processing started in Chapter 2 with a look at the processing of gadget-related events. The events gadgets can respond to are specified by keywords assigned to the first-level subscript descended from their EVENT attribute nodes. Once event processing has been activated, events may occur for a gadget as the result of user interaction with them, or the execution of an ETRIGGER that references one of their EVENT attribute nodes. Focus must be directed to an active gadget (the value of ^$DI($PD,"FOCUS") contains the gadget's name) before a user can trigger an event for it. An event triggered by an ETRIGGER command can occur for any gadget regardless of focus, and the value of ^$DI($PD,"FOCUS") will remain unchanged.

The developer can define the events a gadget can receive callback processing for by assigning matching-event-type keywords as subscripts to its EVENT attribute node. An application can trigger a particular event through the execution of an ETRIGGER command with the desired EVENT attribute node specified in its argument. Example 5.7 shows an EVENT attribute node.

^$W(<span class="emphasis"><iwindow name</i></span> "G" <span class="emphasis"><igadget name,</i></span> "EVENT" <span class="emphasis"><ievent type<span class="emphasis"><i)</i></span>=</i></span>value

EXAMPLE 5.7: Gadget Event Node

The first three subscripts follow the same requirements specified in the Creation and Modification section. The fourth subscript is the attribute keyword that describes the node for event processing. The event type keyword for the node to respond to is identified in the fifth subscript. The value of the node is a...

UNLIMITED FREE ACCESS TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: DC-DC Converter Chips
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.