Kbase P41928: How to Bypass a Leave Trigger when Clicking a Cancel Button
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/09/2003 |
|
Status: Unverified
GOAL:
How to Bypass a Leave Trigger when Clicking a Cancel Button
CAUSE:
This is needed when a LEAVE trigger validation is required but still want to be able to cancel a screen at any time.
FIX:
The following code will (when attached to a LEAVE trigger) bypass the execution of the code in the trigger when the user clicks a "Cancel" button (assuming that your window has a cancel button on it which is named pbnCancel).
ON LEAVE OF <SomeWidget>
DO:
IF LAST-EVENT:EVENT-TYPE = "PROGRESS":U AND
LAST-EVENT:WIDGET-ENTER = pbnCancel:HANDLE THEN
RETURN.
/* Normal Leave Code Goes Here */
END.