DAZ Script |
---|
DzSettingsHelper () |
Choosing the appropriate key type and pushing/popping keys (paths) is handled by the object.
Object : get( String path, String name, Object value )
Retrieves a value from the subkey at the given key.
Parameter(s):
name
is not found; the “value” in a key/value pairReturn Value:
Example:
var oSettingsHelper = new DzSettingsHelper(); var bResult = oSettingsHelper.get( "MyCompany/MyToolName", "MyKey", false ); print( bResult );
Boolean : hasValue( String path, String name )
Retrieves whether a value exists at the given key.
Parameter(s):
Return Value:
true
if path/key exists, otherwise false
.Example:
var oSettingsHelper = new DzSettingsHelper(); var bResult = oSettingsHelper.hasValue( "MyCompany/MyToolName", "MyKey" ); print( bResult );
Boolean : removeValue( String path, String name )
Removes a named value at the given path.
Parameter(s):
Return Value:
true
if path/key exists, otherwise false
.Example:
var oSettingsHelper = new DzSettingsHelper(); var bResult = oSettingsHelper.removeValue( "MyCompany/MyToolName", "MyKey" ); print( bResult );
Since:
void : set( String path, String name, Object value )
Records a named value to the path specified.
Parameter(s):
Example:
var oSettingsHelper = new DzSettingsHelper(); oSettingsHelper.set( "MyCompany/MyToolName", "MyKey", true );