mastering openinsight’s event chain. events ways for objects to communicate with other objects...

12
Stacking the Deck Mastering OpenInsight’s Event Chain

Upload: pierce-morgan

Post on 23-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mastering OpenInsight’s Event Chain. Events Ways for objects to communicate with other objects Physical events – click, lostfocus, etc. Programmatic events

Stacking the Deck

Mastering OpenInsight’sEvent Chain

Page 2: Mastering OpenInsight’s Event Chain. Events Ways for objects to communicate with other objects Physical events – click, lostfocus, etc. Programmatic events

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

Page 3: Mastering OpenInsight’s Event Chain. Events Ways for objects to communicate with other objects Physical events – click, lostfocus, etc. Programmatic 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

Page 4: Mastering OpenInsight’s Event Chain. Events Ways for objects to communicate with other objects Physical events – click, lostfocus, etc. Programmatic 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

Page 5: Mastering OpenInsight’s Event Chain. Events Ways for objects to communicate with other objects Physical events – click, lostfocus, etc. Programmatic events

How Does the Event Chain Flow?• Flows from specific to generic• Flows from application to inherited

Page 6: Mastering OpenInsight’s Event Chain. Events Ways for objects to communicate with other objects Physical events – click, lostfocus, etc. Programmatic events

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

Page 7: Mastering OpenInsight’s Event Chain. Events Ways for objects to communicate with other objects Physical events – click, lostfocus, etc. Programmatic events

DEMONSTRATION

Page 8: Mastering OpenInsight’s Event Chain. Events Ways for objects to communicate with other objects Physical events – click, lostfocus, etc. Programmatic events

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)

Page 9: Mastering OpenInsight’s Event Chain. Events Ways for objects to communicate with other objects Physical events – click, lostfocus, etc. Programmatic events

DEMONSTRATION

Page 10: Mastering OpenInsight’s Event Chain. Events Ways for objects to communicate with other objects Physical events – click, lostfocus, etc. Programmatic events

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

Page 11: Mastering OpenInsight’s Event Chain. Events Ways for objects to communicate with other objects Physical events – click, lostfocus, etc. Programmatic events

CODE EXAMPLE

Page 12: Mastering OpenInsight’s Event Chain. Events Ways for objects to communicate with other objects Physical events – click, lostfocus, etc. Programmatic events

Thank You

Any Questions?