10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Event-based <strong>Programming</strong>How Events Are ExecutedEvent code is not necessarily executed immediately after the event istriggered. The process for executing events is:1. When the event is triggered, OpenROAD sends the event code to thebottom of the application event queue.2. When the event reaches the top of this event queue, OpenROADdispatches the event to the bottom of the appropriate frame's eventqueue. If the event is a user event from an external application, it may goto more than one frame.3. The event code block is executed when the event reaches the top of theframe's event queue.Although actions may appear to the user as concurrent, you must consider theexact order in which various events are triggered. When you understand howthe events work, you can use OpenROAD to communicate between frames forsynchronization and to ensure that the user can perform tasks concurrently.Event-based <strong>Programming</strong>An important concept to keep in mind when planning your OpenROAD scripts isthat users' actions, rather than the order of your code, control the flow of theapplication.In most cases, the code you provide for a particular event is executed onlywhen the user triggers that event from the user interface. Depending on howthe user interacts with the application, the order in which the events aretriggered may differ and some events may not be triggered at all.318 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!