# GraffitiSettings
Class Inherits GraffitiSuite.BaseObject
## About
GraffitiSettings offers a simple way for Xojo developers to load and save their application’s user-specific settings values to an XML file. It supports automatic writing of values on change, automatic selection of default file location, and uses Variant for values so your settings are saved and read the way you intended them to be.
## Preview

Previous
Next
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Error | theMessage as String | (None) | An error occurred. |
| Log | theMessage as String | (None) | A log message has been encountered. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Sub | AddPreset | (None) | Adds a new static set of preset values to the instance. |
| Sub | Constructor | (None) | Creates a new instance of the class. |
| Sub | Constructor | (None) | Creates a new instance of the class. |
| Sub | Constructor | (None) | Creates a new instance of the class. |
| Sub | Erase | (None) | Clears all settings. If DeleteFile is True, then the settings file is removed from the filesystem. |
| Function | GetValue | As | Retrieves a value for the specified setting. DefaultValue will be returned if no entry is found for strKey. |
| Function | HasPreset | As | Returns True if a preset has been added with the name specified by the parameter. |
| Sub | Load | (None) | Reload contents from settings file. |
| Sub | LoadPreset | (None) | Loads the specified preset in to the main settings memory, overwrites any value whose name does not appear in the ignoredValues array. |
| Function | Operator_Lookup | As | |
| Sub | Operator_Lookup | (None) | |
| Function | Preset | As | Returns the dictionary represented by the specified preset name. |
| Sub | RemoveAllPresets | (None) | Clears all added presets. |
| Sub | RemovePreset | (None) | Removes the specified preset. |
| Sub | RemoveSetting | (None) | Remove a setting from the instance and settings file. |
| Sub | Save | (None) | Update settings file with instance values. |
| Sub | SetValue | (None) | Sets a new setting in the instance with value supplied by Value. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| AlwaysSave | Boolean | True | If True, any change to the instance's settings will save all values to the file immediately. |
| Private | As | Nil | |
| Private | As | Nil | |
| Values | Dictionary | Nil | The raw dictionary containing all setting values. |