mastering openinsight’s event chain. events ways for objects to communicate with other objects...
TRANSCRIPT
Stacking the Deck
Mastering OpenInsight’sEvent Chain
Events• Ways for objects to communicate with other
objects• Physical events – click, lostfocus, etc. • Programmatic events – calling events directly
from code• Everything GUI is driven through events
What are Promoted Events?• Definition: Events that are tied to an application
or type of control• Standard events are control/window specific• Alternative names: Global Events, Universal
Events, Generic Events
How Does the Event Chain Flow?Event CURR_APP*EVENTTYPE*FORMNAME.CONTROLNAME
CURR_APP*EVENTTYPE*FORMNAME.
CURR_APP*EVENTTYPE.CONTROLTYPE.OIWIN*
SYSPROG*EVENTTYPE.CONTROLTYPE.OIWIN*
CURR_APP*EVENTTYPE..OIWIN*
SYSPROG*EVENTTYPE..OIWIN*
SYSPROG*..OIWIN* Done
CURR_APP*..OIWIN*
Return 0
EventScriptEvent
Continue?
Continue?
Done
Yes
Yes
No
NoSystemEvent
QuickEvent
ScriptEvent
How Does the Event Chain Flow?• Flows from specific to generic• Flows from application to inherited
Why use Promoted Events?• To easily provide application wide functionality• To manage all functionality tied to a specific
event in one location• To reduce repetitive coding• To eliminate coding in the script events• To eliminate creating quick events
DEMONSTRATION
How are Promoted Events Created Now?• Launch the Design Events menu from the UI
Workspace window • Select your event, enforce it, and click Generate
Promoted Code• Recompile windows to take advantage of the new
promoted event– (Suggestion: Use the Entity -> Compile
feature from the Application Manager to compile multiple forms easily)
DEMONSTRATION
Efficient Management of Promoted Events• Keep promoted events generic• Use “commuter module” functions to manage a
window’s events• Use inherited/sysprog promoted events to work
across all applications
CODE EXAMPLE
Thank You
Any Questions?