Description

Posts an event onto the event queue. The posted event will not be executed until the current event chain is completed. Compare to Send_Event.

Syntax

status = Post_Event (targetctrl, eventname[, arg, ...])

Parameters

The Post_Event function has the following parameters.

ParameterDescription
targetctrlSpecifies the window or control to post the event to. To post an event to a window, pass the window ID; to post to a control, specify the control entity ID (CtrlEntID) as the control name concatenated to the window ID and separated by a period. For a single-instance window, the window ID is always identical to the window name; for multi-instance windows, the window ID, returned from Start_windows or an equivalent function, is not necessarily the window name.
eventnameA valid event name, such as CLICK, READ, OMNIEVENT, and CLOSE.
arg...Pass any number of arguments that are needed by the event handler associated with the event specified in eventname, up to 20 are supported.

Use Post_Event as a mechanism of delaying time consuming processing that does not have to be done immediately.

See also

Get_EventStatus()Send_Event()Set_EventStatus()Chapter 5: Events

  • No labels

3 Comments

  1. Arguments containing @STM delimiters will be converted to @TM when using Post_Event. This does not appear to be a problem with Send_Event.

  2. Arguments containing @RM delimiters will be stripped of all data starting with the first @RM on forward. Send_Event appears to keep the entire dynamic array intact.

  3. Runtime errors can cause Post_Event calls to fail. This is due to a labelled global common variable failing to get cleared. Normally a restart of OpenInsight is required to resolve the problem, but this can be resolved using this code:


    COMMON /%QMANAGER%/ Queue@, bQueueActive@, RequestHold@
    
    Queue@          = ''
    bQueueActive@   = ''
    RequestHold@    = ''