Consultor Eletrônico



Kbase P23216: Sample code for a 4GL trigger defined with the REVERT option
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/04/2003
Status: Unverified

GOAL:

Sample code for a 4GL trigger defined with the REVERT option.

FIX:

/* p-rev.p */

DEFINE BUTTON hello-button LABEL "Greeting".
DEFINE BUTTON revert-button LABEL "Revert".
FORM
hello-button revert-button
WITH FRAME butt-frame.
ON CHOOSE OF hello-button IN FRAME butt-frame
MESSAGE "Outer message".
ENABLE hello-button WITH FRAME butt-frame.
RUN inner.

PROCEDURE inner:
ON CHOOSE OF hello-button IN FRAME butt-frame
MESSAGE "Inner message".
ENABLE revert-button WITH FRAME butt-frame.
WAIT-FOR CHOOSE OF revert-button.
ON CHOOSE OF hello-button IN FRAME butt-frame
REVERT.
DISABLE revert-button WITH FRAME butt-frame.
WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW.
END PROCEDURE.