[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 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 CA-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()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson