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 [2015/08/17 01:34] – zv_odd | en:code:data:inifile [2023/10/14 17:20] (current) – jmgr | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ===== Quick Use ===== | ===== Quick Use ===== | ||
| - | Usable example, (will result in value " | + | Usable example: |
| - | < | + | < |
| - | + | var myObject= new IniFile(); | |
| - | var cfgini | + | myObject.load(" |
| - | cfgini.load(" | + | myObject.setSection(" |
| - | cfgini.setSection(" | + | if (myObject.keyExists(" |
| - | if (cfgini.keyExists(" | + | mytext = myObject.keyValue(" |
| - | mytext = cfgini.keyValue(" | + | |
| newtext = mytext + " | newtext = mytext + " | ||
| - | cfgini.setKeyValue(" | + | myObject.setKeyValue(" |
| }else{ | }else{ | ||
| - | cfgini.setKeyValue(" | + | myObject.setKeyValue(" |
| mytext = cfgini.keyValue(" | mytext = cfgini.keyValue(" | ||
| } | } | ||
| - | cfgini.save(" | + | myObject.save(" |
| </ | </ | ||
| + | Will result in value " | ||
| ===== Functions ===== | ===== Functions ===== | ||
| Line 36: | 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 - ([[en: | * encoding - ([[en: | ||
| Line 255: | Line 253: | ||
| === Exceptions === | === Exceptions === | ||
| - | * (FindSectionError) cannot find the section | + | * (KeyError) cannot find the key |
| ==== keyValue ==== | ==== keyValue ==== | ||
| Line 271: | 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 301: | Line 301: | ||
| === Exceptions === | === Exceptions === | ||
| - | * (FindSectionError) cannot find the section | + | * (KeyError) cannot find the key |
| ==== keyCount ==== | ==== keyCount ==== | ||
en/code/data/inifile.1439775286.txt.gz · Last modified: (external edit)
