Consultor Eletrônico



Kbase P102724: 4GL/ABL: How to prevent the LEAVE trigger from firing when the user clicks on the Application Window
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   29/10/2008
Status: Verified

GOAL:

4GL/ABL: How to prevent the LEAVE trigger from firing when the user clicks on the Application Window X button while in the FILL-IN?

GOAL:

How to make the execution of the LEAVE event trigger conditional to the LAST-EVENT:FUNCTION?

GOAL:

How to write a conditional event trigger?

FACT(s) (Environment):

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

FIX:

The following FILL-IN LEAVE event trigger is an example of how to make to conditionally execute the code of an event trigger. Specifically, this trigger fires only if the LAST-EVENT:FUNCTION is NOT "WINDOW-CLOSE":
DO:
IF LAST-EVENT:FUNCTION <> "WINDOW-CLOSE" THEN DO:
MESSAGE "LEAVE trigger code goes here..."
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.
END.