SubscribeToSystemPropertyChange
Subscribes to event callback for changes of a component System defined property
Function
void SubscribeToSystemPropertyChange(propertyName: string, callbackName: string);
Parameters
Name | Type | Description |
---|---|---|
propertyName | String | The name of the property to subscribe to |
callbackName | String | The name of the callback function |
Return Value
None
Callback definition
void xxxxxxxxxxxxx(property, value)
Name | Type | Description |
---|---|---|
property | Object | The name of the property that changed. |
value | Object | The new value of the property |
Example
Assumes a new System property called ‘MySystemProperty’ has been created.
SetSystemProperty("MySystemProperty",42);
SubscribeToSystemPropertyChange("MySystemProperty","OnSystemPropertyChanged");
function OnSystemPropertyChanged(property, value) {
LogDebug("Property " + property + " value changed to "+ value);
var newvalue = GetSystemProperty("MySystemProperty");
}