Consultor Eletrônico



Kbase P148223: UI triggers are not fired with WAIT-FOR PAUSE
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/15/2010
Status: Unverified

SYMPTOM(s):

UI triggers are not fired with WAIT-FOR PAUSE

Run the source code below to reproduce the issue:
DEF VAR mField1 AS CHAR NO-UNDO.
DEF VAR mField2 AS CHAR NO-UNDO.
FORM
mField1 LABEL "mField1" SKIP
mField2 LABEL "mField2"
WITH FRAME deporeq 1 DOWN OVERLAY CENTERED SIDE-LABELS ROW 2 COLOR messages
TITLE COLOR bright-white "[ WAIT-FOR PAUSE TEST ]".
DO TRANSACTION WITH FRAME deporeq
ON ENDKEY UNDO, LEAVE:
VIEW FRAME deporeq.
mField1:SENSITIVE = YES.
mField2:SENSITIVE = YES.
ON ENTRY OF FRAME deporeq
MESSAGE "ENTRY OF FRAME deporeq" VIEW-AS ALERT-BOX INFO BUTTONS OK.
ON ENTRY OF FRAME deporeq ANYWHERE
MESSAGE "ENTRY OF FRAME deporeq ANYWHERE" VIEW-AS ALERT-BOX INFO BUTTONS OK.
ON ENTRY OF mField1 IN FRAME deporeq
MESSAGE "ENTRY OF mField1" VIEW-AS ALERT-BOX INFO BUTTONS OK.

WAIT-FOR GO OF FRAME deporeq PAUSE 500 .
IF LASTKEY = -1 THEN UNDO, LEAVE.
END.
HIDE FRAME deporeq NO-PAUSE.

The "ENTRY OF mField1" trigger is fired if PAUSE is commented
and is not fired otherwise.

Press Tab to go to the field mField2 - the "ENTRY OF FRAME deporeq" trigger
is fired if PAUSE is commented and is not fired otherwise.

Press Tab again - the "ENTRY OF FRAME deporeq ANYWHERE" is fired
with/without PAUSE.

FACT(s) (Environment):

OpenEdge 10.1C
All Supported Operating Systems

CAUSE:

Bug# OE00079872

CAUSE:

Bug# OE00186475

FIX:

Workaround (WARNING: may cause high CPU usage) - Modify the above example as follows:
DEF VAR mField1 AS CHAR NO-UNDO.
DEF VAR mField2 AS CHAR NO-UNDO.

DEFINE VARIABLE Istart AS INT64 NO-UNDO.
DEFINE VARIABLE LBREAK AS LOGICAL NO-UNDO.

FORM
mField1 LABEL "mField1" SKIP
mField2 LABEL "mField2"
WITH FRAME deporeq 1 DOWN OVERLAY CENTERED SIDE-LABELS ROW 2 COLOR messages
TITLE COLOR bright-white "[ WAIT-FOR PAUSE TEST ]".

DO TRANSACTION WITH FRAME deporeq
ON ENDKEY UNDO, LEAVE:

VIEW FRAME deporeq.

mField1:SENSITIVE = YES.
mField2:SENSITIVE = YES.

ON ENTRY OF FRAME deporeq
MESSAGE "ENTRY OF FRAME deporeq " VIEW-AS ALERT-BOX INFO BUTTONS OK.

ON ENTRY OF FRAME deporeq ANYWHERE
MESSAGE "ENTRY OF FRAME deporeq ANYWHERE" VIEW-AS ALERT-BOX INFO BUTTONS OK.

ON GO OF FRAME deporeq ANYWHERE DO:
MESSAGE "pie"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
LBREAK = yes.
END.

ON ENTRY OF mField1 IN FRAME deporeq
MESSAGE "ENTRY OF mField1" VIEW-AS ALERT-BOX INFO BUTTONS OK.

/*WAIT-FOR GO OF FRAME deporeq PAUSE 5.*/

Istart = mtime.
DO WHILE (mtime - Istart < 500000) AND LBREAK = no:
PAUSE 0.
PROCESS EVENTS.
END.

IF LASTKEY = -1 THEN UNDO, LEAVE.

END.

HIDE FRAME deporeq NO-PAUSE.