There are no system tools to create and manage promoted events, so we use the System Editor to create, save and compile promoted event BASIC+ code, then copy the object code to the SYSREPOSEVENTEXES table.

To increase performance, OpenInsight caches the code in the SYSREPOSEVENTEXES table. If you change your promoted event code, you will need to log out of OpenInsight and log back in to pick up the changes. To avoid this, create a commuter module that simply calls another routine that performs the necessary processing.

Create a new stored procedure in the System Editor.  Paste the following code:

compile function PE_GotFocus_Shell(CtrlEntId, CtrlClassId, PrevFocusID)
*
*  This function traps a promoted event and passes control to a stored procedure
*
declare function PE_GotFocus
val = PE_GotFocus(CtrlEntId, CtrlClassID, PrevFocusID)
 
return val

Save and compile the code as PE_GotFocus_Shell.

  • No labels