CT_RESTGETS

 RESTGETS()
 Restores GET settings from an array
------------------------------------------------------------------------------
 Syntax

     RESTGETS(<aSavedGets>) --> lRestored

 Argument

     <aSavedGets>  Designates a variable previously created by the
     SAVEGETS() function.

 Returns

     RESTGETS() returns .T. when the GET settings are successfully restored.

 Description

     This function restores the information previously saved to an array with
     SAVEGETS().  This reactivates a previously active GET mask.

 Note

     Important!  Never use the Clipper CLEAR GETS commands within the
     SAVEGETS()/RESTGETS() construction.

 Example

     F1 is used to activate the HELP procedure from an input mask.  The
     active GET is saved and then newly opened.  Both GET masks use different
     PICTURE definitions like different VALID UDF's:

       CLEAR
        SET KEY 28 TO HELP            // KEYTRAP definition
        cFirstname  :=  SPACE(10)
        cLastname   :=  SPACE(10)
        @ 10, 10 GET cFirstname PICTURE "@!"
        @ 11, 10 GET cLastname PICTURE "@!" VALID MAINFUNC()
        READ
     *
     * HELP procedure opens new GET
     *

     PROCEDURE HELP (A, B, C)
        LOCAL aOldGets
        aOldGets := SAVEGETS()        // Save GETS
        WOPEN(4, 30, 20, 76)          // Open window
        WBOX()                        // Window border
        cHelp1  :=  SPACE(10)
        cHelp2  :=  SPACE(10)
        @ 10, 10 GET cHelp1 PICTURE "@A"
        @ 11, 10 GET cHelp2 PICTURE "@A" VALID HELPFUNC()
        READ

        RESTGETS(aOldGets)            // Recreate GETS
        WCLOSE()                      // Close window
        RETURN

     FUNCTION MAINFUNC
        SOUND(1000, 10)               //  Short beep
        RETURN(.T.)

     FUNCTION HELPFUNC
        SOUND(1000, 100)              // One long beep
        RETURN(.T.)

See Also: SAVEGETS()



Tools — GET/READ Functions

Introduction GET/READ Functions
COUNTGETS()  Determines the number of posted GET fields
CURRENTGET() Determines the number of the currently active GET field
GETFLDCOL()  Determines the screen column of a GET field
GETFLDROW()  Determines the row of a GET field on the screen
GETFLDVAR()  Determines the name of a GET field
GETINPUT()   Keyboard input function similar to a GET field
GETSECRET()  Keyboard input function for hidden input similar to a GET field
RESTGETS()   Restores GET settings from an array
RESTSETKEY() Restores SET KEY..TO settings from an array
SAVEGETS()   Saves the GET settings of the active environment
SAVESETKEY() Saves SET KEY..TO settings in an array