QueueResponse Method
The QueueResponse method enables inputevent-invoked procedures to make frame and waitfor calls.
Inputevent-invoked procedures typically bypass OpenROAD's asynchronous event-queueing mechanism, but frame and waitfor calls can only execute within that asynchronous mechanism. After calling the QueueResponse method the procedure can make valid frame calls. For details of how to trigger procedure-calls from an inputevent, see the
Response Method.
The QueueResponse facility can operate at the level of individual frames or the entire application.
At frame level, the QueueResponse facility must have been explicitly enabled in the frame that the procedure received as a parameter (inputevent-invoked procedures are always passed a frame and field when invoked). To enable the frame:
• The frame topform must contain an 'async_enabled' taggedvalue.
• The frame must contain an InputEvent object.
The simplest way to do this is to include either a field of datatype InputEvent or an initialize variable of datatype InputEvent in the frame.
At application level, the facility is enabled by setting the environment variable II_W4GL_ASYNC_ENABLED to TRUE.
Note: Enabling at application level impacts Workbench development. You must issue Debug, Stop each time you rerun your application in Workbench to fully stop the previous run.
The best place in the response procedure to issue the QueueResponse call is at the beginning, passing it the frame and hostfield parameters that the procedure received when triggered. For example:
Procedure myEventResponse(
frame = FrameExec default null;
hostfield = FormField default null;
)=
{
if CurInputEvent.QueueResponse(frame=frame, hostfield=hostfield) != ER_OK then
return;
endif;
…
Callframe myPopupDialog() with parentframe=frame;
…
}
This method has the following syntax:
integer = InputEvent.QueueResponse(frame = FrameExec, hostfield = FormField)
This method has the following parameters:
frame
(Required) Specifies the frame that was passed to the procedure making this call
hostfield
(Required) Specifies the field that was passed to the procedure making this call
The method returns ER_OK if the procedure can make frame calls, or an error status if it cannot.