Exit Button not working!

Doug Johnson

New Member
[Progress Version 9.1E - Windows XP]

In the past I've created buttons to exit a procedure and return to a main menu. However, when using the code below, the exit button does NOT work!?!?! Help please:)

Code:
DEFINE TEMP-TABLE tier-list NO-UNDO
   FIELD tier-code AS CHAR
   FIELD tier-name AS CHAR
   FIELD tier-float AS CHAR.

CREATE tier-list. ASSIGN tier-code = "TC1" tier-name = "tname" tier-float = "Y".
CREATE tier-list. ASSIGN tier-code = "TC2" tier-name = "tname" tier-float = "N".

DEFINE QUERY query1 FOR tier-list SCROLLING.

DEFINE BROWSE browse1 QUERY query1 NO-LOCK DISPLAY tier-list.tier-code tier-list.tier-name tier-list.tier-float
    ENABLE tier-list.tier-code tier-list.tier-name tier-list.tier-float WITH 
        13 DOWN 
        WIDTH 50
        NO-ASSIGN 
        SCROLLBAR-VERTICAL
        SEPARATORS.

DEFINE BUTTON exitbutton          
    LABEL "Exit" 
    FONT 2 
    SIZE 6 BY 1.2.

DEFINE FRAME frame1
    "                 TIER MAINTENANCE" SKIP(.25)
    SPACE(1) exitbutton
    SKIP(.25)
    browse1 SKIP(.25)
        WITH CENTERED.

/*######################################*/
/*##### EXIT BUTTON CLICKED ############*/
/*######################################*/
ON 'CHOOSE':U OF exitbutton IN FRAME frame1
DO:
    MESSAGE "EXIT" VIEW-AS ALERT-BOX.
    /*APPLY "CLOSE" TO THIS-PROCEDURE. THIS DOES NOT WORK!!!
    RETURN NO-APPLY.*/
END.

OPEN QUERY query1 FOR EACH tier-list.

PAUSE 0 BEFORE-HIDE.
ENABLE ALL WITH FRAME frame1.
WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW.
 

Doug Johnson

New Member
Thanks mrobles! I replaced my WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW. and uncommented the APPLY "CLOSE" in the ON 'CHOOSE' but it still doesn't work. Obviously I'm not doing something right.

Code:
ON 'CHOOSE':U OF exitbutton IN FRAME frame1
DO:
    MESSAGE "EXIT" VIEW-AS ALERT-BOX.
    APPLY "CLOSE" TO THIS-PROCEDURE.
    RETURN NO-APPLY.
END.

OPEN QUERY query1 FOR EACH tier-list.

PAUSE 0 BEFORE-HIDE.
ENABLE ALL WITH FRAME frame1.
WAIT-FOR CLOSE OF THIS-PROCEDURE.
 

SergioC

Member
Hi, Doug, try it.

/*######################################*/
/*##### EXIT BUTTON CLICKED ############*/
/*######################################*/
ON 'CHOOSE':U OF exitbutton IN FRAME frame1
DO:
MESSAGE "EXIT" VIEW-AS ALERT-BOX.
APPLY "CLOSE" TO THIS-PROCEDURE.
/*RETURN NO-APPLY.*/
END.


OPEN QUERY query1 FOR EACH tier-list.


PAUSE 0 BEFORE-HIDE.
ENABLE ALL WITH FRAME frame1.
WAIT-FOR "CLOSE" OF THIS-PROCEDURE.

Regards.
 

rzr

Member
WAIT-FOR CLOSE OF THIS-PROCEDURE. & WAIT-FOR "CLOSE" OF THIS-PROCEDURE.
shoud both work the same !!
 

rzr

Member
Hellorzr, notWAIT-FOR "CLOSE"the solution, thesolution is to have commentedRETURNNO-APPLY.
Regards.

Code:
[FONT=courier new]ON 'CHOOSE':U OF exitbutton IN FRAME frame1
DO:
       APPLY "CLOSE" TO THIS-PROCEDURE.
       RETURN NO-APPLY.
END.

OPEN QUERY query1 FOR EACH tier-list.
PAUSE 0 BEFORE-HIDE.
ENABLE ALL WITH FRAME frame1.
WAIT-FOR "CLOSE" OF THIS-PROCEDURE .[/FONT]

and this will work too.... but anyways the OP has his solution..... :)
 
Top