Got Event Logic? (OpenInsight 32-Bit)
At 15 JUN 2006 12:14:13PM Don Muskopf wrote:
I created a simple test form with two editline controls. One is an ID field filled by SEQKEY which was defined as the default in the Dictionary and another simply called EDL2. There are no promoted events, quick events or scripts. I ran the OpenEngine log, did a test run of the form and as soon as the form completed its display, stopped the log. Based on the OpenEngine log below , can someone please explain the logic of how the events are being fired? For example,
1) Why does the ID field get focus before the CREATE event is run?
2) Why does the CHANGED event get fired 3 times for the ID field?
3) Why does the SIZE event get fired twice in a row?
Start OpenEngine log - 6/15/2006 10:25:21
RUN START_OIWIN 'WINDOW_NAME'
RUN RUN_EVENT 'APPNAME*OIWIN', 'WINDOW_NAME', 'WINDOW', 'SIZE*11*SYSPROG*..OIWIN*', '467','219','434','140'
RUN RUN_EVENT 'APPNAME*OIWIN', 'WINDOW_NAME', 'WINDOW', 'SIZE*11*SYSPROG*..OIWIN*', '467','219','434','140'
RUN RUN_EVENT 'APPNAME*OIWIN', 'WINDOW_NAME', 'WINDOW', 'ACTIVATED*11*SYSPROG*..OIWIN*'
RUN RUN_EVENT 'APPNAME*OIWIN', 'WINDOW_NAME.ID', 'EDITFIELD', 'GOTFOCUS*2*SYSPROG*GOTFOCUS..OIWIN*',
RUN RUN_EVENT 'APPNAME*OIWIN', 'WINDOW_NAME', 'WINDOW', 'CREATE*11*SYSPROG*..OIWIN*',
RUN RUN_EVENT 'APPNAME*OIWIN', 'WINDOW_NAME.ID', 'EDITFIELD', 'CHANGED*11*SYSPROG*..OIWIN*', '39' RUN RUN_EVENT 'APPNAME*OIWIN', 'WINDOW_NAME', 'WINDOW', 'INACTIVATED*11*SYSPROG*..OIWIN*' RUN RUN_EVENT 'APPNAME*OIWIN', 'WINDOW_NAME.ID', 'EDITFIELD', 'LOSTFOCUS*2*SYSPROG*LOSTFOCUS..OIWIN*', '0',
RUN RUN_EVENT 'APPNAME*OIWIN', 'WINDOW_NAME.ID', 'EDITFIELD', 'CHANGED*11*SYSPROG*..OIWIN*', '39'
RUN RUN_EVENT 'APPNAME*OIWIN', 'WINDOW_NAME.ID', 'EDITFIELD', 'CHANGED*11*SYSPROG*..OIWIN*', '39'
RUN RUN_EVENT 'APPNAME*OIWIN', 'WINDOW_NAME.EDL2', 'EDITFIELD', 'CHANGED*11*SYSPROG*..OIWIN*', ''
Stop OpenEngine log - 6/15/2006 10:25:25
Thanks for helping me understand this.
At 15 JUN 2006 03:13PM John Bouley wrote:
Well Don, I am probably not the best person to answer as you can guess by my previous posts regarding Event processing. However, I did have a discussion about the ID getting focus before the Create Event. This is solved by making the Window Invisible and making it visible during the Create Event.
At 15 JUN 2006 03:35PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Don,
1) Why does the ID field get focus before the CREATE event is run?
This happens because one is fired from a message sent by Windows as soon as the window is created , while the other is a OI 'synthetic' event that gets fired just after…
Here's the sequence of events:
a) Start_Window calls Utility "CREATE" which tells PS to create the window
b)At this point PS creates the window, and Windows sends SIZE messages, an ACTIVATED message, and a GOTFOCUS message to the control with focus. PS traps these events and calls RUN_EVENT() to handle them.
c) After this control returns to start_Window which calls RUN_EVENT() to fire the CREATE event.
2) Why does the CHANGED event get fired 3 times for the ID field?
a) The SEQKEY being set
b) The LOSTFOCUS
c) Possible READ event processing?
3) Why does the SIZE event get fired twice in a row?
a) When the window size is adjusted before you see it (to handle size adjustments based on the window client area)
b) When the window is made visible.
World leaders in all things RevSoft
At 15 JUN 2006 03:51PM Don Muskopf wrote:
Thanks, guys. That helped a lot.
Don