A general-purpose object used to hold and display property values
Property: dirty
Gets or sets the modified status of the object
bool dirty();
dirty = bool
Method: doDialog
Displays a standard properties dialog box allowing editing of property values
bool doDialog();
bool doDialog(schemaName);
bool doDialog(schemaObj);
Parameters | ||
---|---|---|
Name | Expected Type | Description |
schemaName | String | Optional schema to use to display properties items |
schemaObj | SPPropsSchema | A properties schema object |
Returns true if the user completed the dialog by clicking OK or equivalent, false if the operation was cancelled
If the schema is specified, exactly the items given in the schema are displayed, using the given data types and default values. If no schema is specified, then all the values in the object are displayed using their native data type
Method: getProperty
Get a named property on this object
object getProperty(name);
object getProperty(name, baseType);
Parameters | ||
---|---|---|
Name | Expected Type | Description |
baseType | String | The name of the base type to be used to return the value, e.g. "string". An attempt will be made to convert the given data to this type. An exception is generated if a conversion cannot be made. If this is not specified, the value is returned as the script data type most closely matching the native storage type |
name | String | The name for this property item, cannot be empty |
Property: names
Returns an array of strings containing the names (in sorted order) of all properties in this object
SPArray names();
Method: setProperty
Set a named property on this object
void setProperty(name);
void setProperty(name, value);
void setProperty(name, value, markAsTemp);
void setProperty(name, value, markAsTemp, baseType);
void setProperty(name, value, markAsTemp, baseType, sortValue);
Parameters | ||
---|---|---|
Name | Expected Type | Description |
markAsTemp | bool | True to mark this item as a temporary value, i.e. it will not be saved when the object is stored |
value | object | The new value for this item. If no value is provided, the property is defined with a null value |
baseType | String | The base type to be used to store the value. An attempt will be made to convert the given data to this type |
name | String | The name for this property item, cannot be empty |
sortValue | String | Optional value used to sort properties for display and storage in the absence of any othe schema |
Property: summary
Returns a formatted string showing the values of all properties in a compact form for display and debugging
string summary();
Property: xml
Gets or sets the value of all contained properties in XML format
String xml();