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>savesetkey()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SAVESETKEY()
 Saves SET KEY..TO settings in an array
------------------------------------------------------------------------------
 Syntax

     SAVESETKEY() --> aSavedTraps

 Returns

     SAVESETKEY() returns an array within which information for the current
     SET KEY..TO settings are saved.

 Description

     SAVE SET KEY..TO SETTINGS
     SAVESETKEY() saves the current SET KEY..TO settings in an array.  This
     makes it possible to redefine function keys already assigned, and to
     later restore the old settings with RESTSETKEY().

 Note

     .  The array you create is valid only for the current program
        run.  Therefore, is not useful to save this data in the file.

 Examples

     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^n   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: RESTSETKEY() SAVEGETS()

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