CT_SAVEGETS

 SAVEGETS()
 Saves the GET settings of the active environment
------------------------------------------------------------------------------
 Syntax

     SAVEGETS() --> aSavedGets

 Returns

     SAVEGETS() returns an array that contains all information necessary to
     save the active GET environment.

 Description

     SAVEGETS() only returns the array with the current GET object.  This
     allows you to save it to a LOCAL variable and restore it later to the
     previous GET settings through RESTGETS().  This way, it is also possible
     to newly open a GET mask or VALID UDF from within a KEYTRAP procedure
     without losing the previous one.

 Notes

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

     .  The array returned by SAVEGETS() is valid only during the
        current program run.  Therefore, it is not useful to save this data
        in the file.

     .  Effective with Clipper, the cursor position is always saved
        when you leave an input field.  If you do not want to do this, place
        the key code for Pos1 in the keyboard buffer through KEYSEND at the
        end of the trap procedure.

 Example

     F1 activates the HELP procedure from an input mask.  The active GET is
     saved there 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: RESTGETS()



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