<cAppConfig>.SetSearchKey

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > AppConfig > cAppConfig Class > <cAppConfig> Methods >

<cAppConfig>.SetSearchKey

 

Description

 

Set the base search key to be prefixed to all successive <cAppConfig>.GetKey(sKey)

 

Syntax

 

Syntax

 

s = <cAppConfig>.SetSearchKey(NewSearchKey)

 

Returns

 

String, previous search base key

 

Parameters

 

Name

Type

Optional

Meaning

NewSearchKey

String

No

New base search key

 

 

Remarks

 

To save some typing and allow dynamic loading of keys sets, it is possible to set a base search string that will be added to all successive .GetKey(...) search.

So, for example, adding "Debug" as SearchKey, instead of searching for MyAppConfig.GetKey("Debug\AppData\Author_Name") you cans search for

MyAppConfig.GetKey("AppData\Author_Name") only because thinBasic will add "Debug" in front of "AppData\Author_Name"

 

Restrictions

 

See also

 

Examples

 

See cAppConfig example