public class Binding:
Common one-way, two-way and watch data-binding engine.
The API is shared by window and terminal widgets. It binds observable state declared with signal property; the compiler emits the change notification automatically when the property setter completes. UI events use event declarations and payload classes from klyn.events or klyn.gui.event. User code observes or binds state; it never fires a signal property manually.
Binding.twoWay(slider::value, spin::value) Binding.watch(slider::value, lambda(value: Object): print(value))
| Modifier and Type | Member | Description |
|---|---|---|
| public static | oneWayoneWay(left as BindingRef, right as BindingRef) as Void: |
Synchronizes right from left and keeps it updated. |
| public static | twoWaytwoWay(left as BindingRef, right as BindingRef) as Void: |
Synchronizes both members and keeps them mutually updated. |
| public static | unwatchunwatch(source as BindingRef, handler as Object) as Void: |
Unregisters a previously registered callback. |
| public static | watchwatch(source as BindingRef, handler as Object) as Void: |
Registers a callback invoked when the referenced signal property changes. |