Classes will have two new lifecycle hooks, 'validate' and 'update', in addition to the existing ones ('construct', 'destruct' and 'init'/'deinit' from corto/lang/type).
The validate hook will be called before an instance of the class is updated. The function will return an int16. If it returns a non-zero value, the update will be canceled (no observers will be notified) and the object will be invalidated (just like with construct).
The update hook will be called after observers have been notified of an update for the instance.
Classes will have two new lifecycle hooks, 'validate' and 'update', in addition to the existing ones ('construct', 'destruct' and 'init'/'deinit' from
corto/lang/type
).The
validate
hook will be called before an instance of the class is updated. The function will return anint16
. If it returns a non-zero value, the update will be canceled (no observers will be notified) and the object will be invalidated (just like withconstruct
).The
update
hook will be called after observers have been notified of an update for the instance.