Consultor Eletrônico



Kbase P20050: Error 4123 multiple WAIT-FOR's not correctly nested
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   18/03/2009
Status: Verified

SYMPTOM(s):

None of the widgets used in WAIT-FOR statement are SENSITIVE WAIT-FOR terminated. (4123)

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

CHANGE:

Closed windows in different order

CAUSE:

Well known programing problem at the application level. It happens when multiple WAIT-FOR statements are used and when they are not correctly nested: the event waited by a first WAIT-FOR is fired before the event of another WAIT-FOR that came later. As a consequence, the flow of the program is lost.

FIX:

Take care to ensure that the WAIT-FOR statements are correctly nested (i.e. make the event of a first WAIT-FOR impossible to occur before the event of a WAIT-FOR that comes next, as show below)

ParentWinHandle:VISIBLE = NO. /* so it is impossible to close the */
/* window and WAIT-FOR CLOSE OF */
/* THIS-PROCEDURE remains active */

RUN ChildWindow.w. /* want the WAIT-FOR in this Child */
/* Window to be active which makes */
/* two active WAIT-FOR statements */

ParentWindowHandle:VISIBLE = YES.
However, keep in mind that the best way to design event driven applications in Progress is to use a single WAIT-FOR statement for the entire application.