State change
The state-change operators create actions that modify the state of the system in which the action runs. The platform provides the following kinds.
- Property change (
CHANGE) — writes the value of an expression to a mutable property for the sets of arguments where a condition holds. - New object (
NEW) — creates objects of a custom class, optionally writing each created object to a data property. - Class change (
DELETE/CHANGECLASS) — assigns a target class to selected objects, or deletes them from the system.
State change here refers to the state of the system in which the action runs. Interaction with external systems is included in the user interaction section.
Asynchronous update
The asynchronous update operator creates an action that sends the value of an expression to the editor that the user has currently open on a form, replacing its in-progress edit value. It is used in change-event handlers of properties displayed on a form, where the handler computes a new value that the open editor should reflect immediately, before the next form refresh. Outside an active edit the action has no effect.
The operator takes one argument — the expression whose value should be displayed — and uses its value at the moment of execution.
Language
To declare an asynchronous-update action, use the ASYNCUPDATE operator.
Examples
// pushing the new value of the displayed code back to the open editor
onChangeSizeCode(Store store) {
DIALOG SelectStoreSize OBJECTS ss INPUT DO {
storeSize(store) <- ss;
}
ASYNCUPDATE storeSizeCode(store);
}