Fury:settingxml (Data Type)

From Lavish Software Wiki
Jump to navigation Jump to search

Description

Members

  • string Name: Name of the setting file
  • int Sets: Total number of sets
  • string Set[#]: Retrieves the name of the nth set from the file (1-based)
  • dataset Set[name]: Retrieves the data set with the given name

Methods

  • Clear: Clears the setting file
  • AddSet[name]: Adds a data set
  • RemoveSet[name]: Deletes a setting in this data set
  • Save: Saves the setting file
  • Unload: Unloads the setting file, dropping any unsaved changes

Returns

Same as Name

Examples

Creating a setting file from a script

function main()
{
	;This is the name of our setting file
	declarevariable SettingFile string local "Test.xml"
	
	; Create a couple of sections and values
	SettingXML[${SettingFile}].Set[TestSection]:Set[testvalue,1]
	SettingXML[${SettingFile}].Set[TestSection]:Set[testvalue2,2]
	SettingXML[${SettingFile}].Set[TestSection2]:Set[testvalue,1]
	SettingXML[${SettingFile}].Set[TestSection2]:Set[testvalue2,2]
	
	; Save the file
	SettingXML[${SettingFile}]:Save
	
}

See Also