FRAME-NAME function Returns the name of the frame that the cursor is in to a field that is enabled for input. Note: Does not apply to SpeedScript programming. Syntax FRAME-NAME Example This procedure displays Customer information in one frame, then displays Order information for the Customer in a second frame. Use the FRAME-NAME function to display the name of the frame the cursor is in. r-frname.p FOR EACH Customer, EACH Order OF Customer: DISPLAY Order.OrderNum WITH CENTERED ROW 2 FRAME onum. UPDATE Customer.CustNum AT 5 Customer.Name AT 30 SKIP WITH FRAME custfrm WITH CENTERED 1 DOWN EDITING: DISPLAY " You are currently editing a frame called " FRAME-NAME WITH FRAME d1 WITH 1 DOWN CENTERED. READKEY. APPLY LASTKEY. IF LASTKEY = KEYCODE("RETURN") THEN MESSAGE " Press the space bar to edit order shipdate". END. /* Editing */ HIDE FRAME custfrm. HIDE FRAME d1. UPDATE Order.ShipDate AT 5 WITH FRAME orderfrm WITH CENTERED 1 DOWN EDITING: DISPLAY " Now you are editing a frame called" FRAME-NAME WITH FRAME d2 WITH 1 DOWN CENTERED. READKEY. APPLY LASTKEY. END. HIDE FRAME orderfrm. HIDE FRAME d2. END. Notes The FRAME-NAME function returns an empty string for a frame that has not been named (the default frame). It also returns an empty string if the cursor is in a field that is not enabled for input. When using the FRAME-NAME function, you must place it logically following the Frame phrase where it is named. FRAME-NAME is especially useful for context-sensitive help. See also Frame phrase, PROGRAM-NAME function
FRAME-NAME
FOR EACH Customer, EACH Order OF Customer:
DISPLAY Order.OrderNum WITH CENTERED ROW 2 FRAME onum.
UPDATE Customer.CustNum AT 5 Customer.Name AT 30 SKIP
WITH FRAME custfrm WITH CENTERED 1 DOWN EDITING:
DISPLAY " You are currently editing a frame called " FRAME-NAME
WITH FRAME d1 WITH 1 DOWN CENTERED.
READKEY.
APPLY LASTKEY.
IF LASTKEY = KEYCODE("RETURN") THEN
MESSAGE " Press the space bar to edit order shipdate".
END. /* Editing */
HIDE FRAME custfrm.
HIDE FRAME d1.
UPDATE Order.ShipDate AT 5
WITH FRAME orderfrm WITH CENTERED 1 DOWN EDITING:
DISPLAY " Now you are editing a frame called" FRAME-NAME
WITH FRAME d2 WITH 1 DOWN CENTERED.
END.
HIDE FRAME orderfrm.
HIDE FRAME d2.