Question Creating And Using Menus

Hello Everyone!, I'm new in progress programming, can you please help me I just copied this code from the book for creating and using menus but it won't display can you please help me what is missing from this code to diplay the menu. Thank you, I will use it for my example and also for my reference on how to use menus.



/************Define Widgets***********/
DEFINE SUB-MENU smOpen
MENU-ITEM miCust LABEL "Customer"
MENU-ITEM miOrder LABEL "Order".

DEFINE SUB-MENU smTable
SUB-MENU smOpen LABEL "Open"
MENU-ITEM miExit LABEL "Exit".

DEFINE SUB-MENU smReports
MENU-ITEM miLabels LABEL "Customer labels"
MENU-ITEM miNames LABEL "Customer Names"
RULE
MENU-ITEM miBalance LABEL "Order Totals"
MENU-ITEM miToday LABEL "Order Items".

DEFINE SUB-MENU smHelp
MENU-ITEM miHelp LABEL "Help".

DEFINE MENU mbar MENUBAR
SUB-MENU smTable LABEL "Tables"
SUB-MENU smReports LABEL "Reports"
SUB-MENU smHelp LABEL "Help".

/*********Define Frame***************/
DEFINE FRAME frm1 WITH SIDE-LABELS CENTERED ROW 6.

/**********Assign MenuBAR************/
ASSIGN DEFAULT-WINDOW:MENUBAR = MENU mbar:HANDLE.

/**********Define Triggers***********/
ON CHOOSE OF MENU-ITEM miLabels IN MENU smReports
RUN display-labels.
ON CHOOSE OF MENU-ITEM miExit
APPLY "CLOSE-WINDOW" TO DEFAULT-WINDOW.

/************Main Logic********************/
ENABLE ALL WITH FRAME frm1.
HIDE FRAME frm1 NO-PAUSE.
WAIT-FOR CHOOSE OF MENU-ITEM miExit.

PROCEDURE display-labels:
FOR EACH customer WITH FRAME frm1:
DISPLAY NAME SKIP address SKIP address2 SKIP city state postalcode WITH USE-TEXT.
PAUSE.
END.
HIDE FRAME frm1 NO-PAUSE.
END PROCEDURE.
 
Top