en:code:data:inifile
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:code:data:inifile [2011/04/20 20:43] – code:data:inifile renamed to en:code:data:inifile jmgr | en:code:data:inifile [2023/10/14 17:20] (current) – jmgr | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| This object allows you to read and write to a INI file. | This object allows you to read and write to a INI file. | ||
| + | ===== Quick Use ===== | ||
| + | Usable example: | ||
| + | <code javascript> | ||
| + | var myObject= new IniFile(); | ||
| + | myObject.load(" | ||
| + | myObject.setSection(" | ||
| + | if (myObject.keyExists(" | ||
| + | mytext = myObject.keyValue(" | ||
| + | newtext = mytext + " | ||
| + | myObject.setKeyValue(" | ||
| + | }else{ | ||
| + | myObject.setKeyValue(" | ||
| + | mytext = cfgini.keyValue(" | ||
| + | } | ||
| + | myObject.save(" | ||
| + | </ | ||
| + | Will result in value " | ||
| ===== Functions ===== | ===== Functions ===== | ||
| Line 17: | Line 34: | ||
| === Arguments === | === Arguments === | ||
| - parameters - (object) parameters | - parameters - (object) parameters | ||
| - | * delimiter - (char) the delimiter to use | + | * <del>delimiter - (char) the delimiter to use</ |
| - | * commentchar - (char) the comment character | + | * <del>commentchar - (char) the comment character</ |
| - | * encoding - ([[code: | + | * encoding - ([[en:code: |
| === Exceptions === | === Exceptions === | ||
| Line 157: | Line 174: | ||
| === Arguments === | === Arguments === | ||
| - | - encoding - ([[code: | + | - encoding - ([[en:code: |
| === Returns === | === Returns === | ||
| Line 236: | Line 253: | ||
| === Exceptions === | === Exceptions === | ||
| - | * (FindSectionError) cannot find the section | + | * (KeyError) cannot find the key |
| ==== keyValue ==== | ==== keyValue ==== | ||
| Line 252: | Line 269: | ||
| * (string) the key value | * (string) the key value | ||
| + | === Exceptions === | ||
| + | * (KeyError) cannot find the key | ||
| ==== setKeyValue ==== | ==== setKeyValue ==== | ||
| Sets the value of the key **keyName**. | Sets the value of the key **keyName**. | ||
| Line 257: | Line 276: | ||
| === Syntax === | === Syntax === | ||
| <code javascript> | <code javascript> | ||
| - | myObject.keyValue(keyName, value); | + | myObject.setKeyValue(keyName, value); |
| </ | </ | ||
| Line 282: | Line 301: | ||
| === Exceptions === | === Exceptions === | ||
| - | * (FindSectionError) cannot find the section | + | * (KeyError) cannot find the key |
| ==== keyCount ==== | ==== keyCount ==== | ||
en/code/data/inifile.1303332184.txt.gz · Last modified: (external edit)
