Property | Defined by | ||
---|---|---|---|
_data : Object The object in which we store things, usually _so.data.
| Config | ||
_so : SharedObject The shared object that contains our preferences.
| Config |
Method | Defined by | ||
---|---|---|---|
Config(path:String)
Constructs a new config object which will obtain configuration
information from the specified path.
| Config | ||
ensureCapacity(kilobytes:int, onFailure:Function, onSuccess:Function = null):void
Ensure that we can store preferences up to the specified size.
| Config | ||
getPropertyNames():Array
Gets all the property names.
| Config | ||
getValue(name:String, defValue:Object):Object
Fetches and returns the value for the specified configuration property.
| Config | ||
isPersisting():Boolean
Are we persisting settings?
| Config | ||
remove(name:String):void
Remove any set value for the specified preference.
| Config | ||
setPath(path:String):void
Set the path, if null then we aren't persisting settings.
| Config | ||
setValue(name:String, value:Object, flush:Boolean = true):void
Returns the value specified.
| Config |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched when this Config object has a value set on it. | Config |
Constant | Defined by | ||
---|---|---|---|
CONFIG_VALUE_SET : String = "ConfigValSet" [static] The event type dispatched when a config value changes.
| Config |
_data | property |
protected var _data:Object
The object in which we store things, usually _so.data.
_so | property |
protected var _so:SharedObject
The shared object that contains our preferences.
Config | () | constructor |
public function Config(path:String)
Constructs a new config object which will obtain configuration information from the specified path.
Parameterspath:String |
ensureCapacity | () | method |
public function ensureCapacity(kilobytes:int, onFailure:Function, onSuccess:Function = null):void
Ensure that we can store preferences up to the specified size. Note that calling this method may pop up a dialog to the user, asking them if it's ok to increase the capacity. The result listener may never be called if the user doesn't answer the pop-up.
Parameterskilobytes:int — a function that will be passed an exception on failure.
|
|
onFailure:Function — an optional function that will be passed this on success.
|
|
onSuccess:Function (default = null )
|
getPropertyNames | () | method |
public function getPropertyNames():Array
Gets all the property names.
ReturnsArray |
getValue | () | method |
public function getValue(name:String, defValue:Object):Object
Fetches and returns the value for the specified configuration property.
Parametersname:String |
|
defValue:Object |
Object |
isPersisting | () | method |
public function isPersisting():Boolean
Are we persisting settings?
ReturnsBoolean |
remove | () | method |
public function remove(name:String):void
Remove any set value for the specified preference. This does not dispatch an event because this would only be done to remove an obsolete preference.
Parametersname:String |
setPath | () | method |
public function setPath(path:String):void
Set the path, if null then we aren't persisting settings.
Parameterspath:String |
setValue | () | method |
public function setValue(name:String, value:Object, flush:Boolean = true):void
Returns the value specified.
Parametersname:String |
|
value:Object |
|
flush:Boolean (default = true )
|
ConfigValSet | event |
com.threerings.util.NamedValueEvent
com.threerings.util.Config.CONFIG_VALUE_SET
Dispatched when this Config object has a value set on it.
The event type dispatched when a config value changes.
CONFIG_VALUE_SET | constant |
public static const CONFIG_VALUE_SET:String = "ConfigValSet"
The event type dispatched when a config value changes.