CT_SAVESETKEY

 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()



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.