Consultor Eletrônico



Kbase P79009: OCX Control event breaks WAIT-FOR in dialog box.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   18/03/2009
Status: Verified

SYMPTOM(s):

OCX Control event breaks WAIT-FOR in dialog box.

FRAME used in WAIT-FOR statement is not VISIBLE. WAIT-FOR terminated. (2910)

None of the widgets used in the WAIT-FOR statement are in a state (such as SENSITIVE) such that the specified event can occur. WAIT-FOR terminated. (4123)

OCX Control located in window or dialog called from a dialog

Event is raised due to property assignment or method call of OCX

OCX Event has trigger procedure defined in 4GL.

FACT(s) (Environment):

Windows
Progress 9.x
OpenEdge 10.x

CAUSE:

The OCX events are handled differently from 4GL events. Because of this, an OCX trigger procedure that is fired before the WAIT-FOR in the containing procedure becomes active can break the outer WAIT-FOR.

FIX:

Move the code that raises the OCX event to a UI event. It is recommended to place it in the ENTRY event of the outermost container widget for the procedure containing the OCX. (Default frame for dialog box procedures, window widget for window procedures).
For example, the following code may be used in conjunction with DBI Technologies Date Picker OCX to avoid error 2910:
ON "Entry" OF FRAME myframe ANYWHERE do:
IF wp-first = YES THEN DO:
ASSIGN wp-first = NO.
ASSIGN ocx-ctdate:DATE = INTEGER(TODAY) - 2415022.
END.
END.