Douglas KN
11/29/2019, 3:13 AMjava.lang.RuntimeException: A bound value cannot be set.
because x2p
in ThingModel is two-way bound. Is there any way to change the val x2p = bind(Thing::x2Property)
call to be just a one-way binding? I'm only using it for display purposes -- there's nothing that needs to be written back.albrechtroehm
11/29/2019, 2:03 PMx
directly in the view when its only for displaying the value x 2 ... Like override val root = vbox { label(stringBinding(thing1.x){value *2})}
albrechtroehm
11/29/2019, 2:06 PMval travelCosts: NumberBinding = Bindings.multiply(travelDistanceProperty, costsPerKilometerProperty)
//ItemViewModel
val travelCost = bind(Model::travelCosts)
Douglas KN
11/30/2019, 12:32 AMDouglas KN
11/30/2019, 1:08 AMIntegerBinding [invalid]
for the label. And then, with that code uncommented I see IntegerBinding 2
which looks kind of weird. And I don't see the value in thing1 changing after the model commits.