Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>restsetkey()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 RESTSETKEY()
 Restores SET KEY..TO settings from an array
------------------------------------------------------------------------------
 Syntax

     RESTSETKEY(<aSavedTraps>) --> lRestored

 Argument

     <aSavedTraps>  Designates an array previously created by
     SAVESETKEY().

 Returns

     RESTSETKEY() returns .T. when you can restore the <aSavedTraps> SET
     KEY..TO settings.

 Description

     RESTORE "SET KEY..TO" SETTING
     RESTSETKEY() restores SET KEY..TO settings previously saved to an array
     with SAVESETKEY().

     Important!  It is impossible to use the saved information any longer
     that the runtime of an application.  The character string that results
     cannot be saved to a file and reloaded later.

 Example

     A key trap definition for the F1 key is changed within a nested input:

     CLEAR
        SET KEY 28 TO HELP1          // First def. for F1
        cFirstname := SPACE(10)
        cLastname  := SPACE(10)
        @ 10, 10 GET cFirstname
        @ 11, 10 GET cLastname
     READ

     PROCEDURE HELP1 ( A, B, C)

        WOPEN(4, 4, 20, 76)          // Open window
        WBOX()                       // Window borders
        aOldKey := SAVESETKEY()      // Save SET KEY def.
        aOldGet := SAVEGETS()        // Save GET def.
        SET KEY 28 TO HELP2          // New def. F1
        cHelp1 := SPACE(10)          // New GET
     cHelp2 := SPACE(10)             // ...e.g. help index
        @ 10, 10 GET cFirstname
        @ 11, 10 GET cLastname
        READ
        RESTGETS(aOldGet)            // Recreate old GET
        RESTSETKEY(aOldKey)          // Return .T. if OK
        WCLOSE()                     // Close window
        RETURN

     PROCEDURE HELP2 ( A, B, C)      // 2nd help procedure
        * e.g. a second help environment - key layout etc.
        RETURN


See Also: SAVESETKEY()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson