Binding1
class Binding1<E : Any, T : Any>(program: Program, val element: Element, val event: Event<E>, val container: Any, val property: KMutableProperty1<Any, T>, newValueFromEvent: (E) -> T, setElementValue: (T) -> Unit) : AutoCloseable(source)
A class that creates a two-way binding between an event-driven system and a property of a container, ensuring synchronization of state between a KMutableProperty1 and an external element's value.
Parameters
E
The type of the event payload.
T
The type of the property being bound.
program
The program execution context for managing coroutines.
element
The external UI element or container being synchronized.
event
The event that triggers updates to the binding.
container
The container object that owns the property being synchronized.
property
The mutable property of the container to be synchronized.
newValueFromEvent
A lambda mapping an event payload to the new property value.
setElementValue
A lambda to update the external element's value.