edvin
01/07/2017, 8:41 PMvalue(someValue)
function that will call the underlying updateValue()
function.groostav
01/07/2017, 10:03 PMcom.sun.javafx.binding.SelectBinding
and similar?groostav
01/07/2017, 10:03 PMedvin
01/07/2017, 10:15 PMedvin
01/07/2017, 10:16 PMcom.sun.javafx
. It's still part of the JDK 🙂edvin
01/07/2017, 10:18 PMrunAsync
construct". I want to describe this now, just wanted to check if you had a specific place for it in mind?edvin
01/07/2017, 10:21 PMSelectBinding
. If this is a thing people need and use I think we can leverage some TornadoFX/Kotlin features to make it much nicer.groostav
01/07/2017, 10:25 PMgroostav
01/07/2017, 10:25 PMgroostav
01/07/2017, 10:27 PMchildren
to a projection on a list of controllersgroostav
01/07/2017, 10:28 PMclass RootController {
var subComponents: List<SubController>
@FXML lateinit var vbox: VBox
override fun initialize(){
bindContent(vbox.children, subComponents.map { it.view });
}
}
class SubController {
val view: Node get() = ...
}
groostav
01/07/2017, 10:29 PMmap
is a good fit for what should be passed into the SelectBinding
.groostav
01/07/2017, 10:29 PMLinq To Kotlin
yet...jchildress
01/07/2017, 11:24 PMcom.sun.*
packages will affected by changes in Java 9. https://blogs.oracle.com/java/get-ready-jdk9 and http://openjdk.java.net/jeps/260 I think they will maybe be renamed/moved?nakamin
01/08/2017, 12:11 AMthomasnield
01/08/2017, 12:37 AMedvin
01/08/2017, 9:36 AMedvin
01/08/2017, 9:37 AMedvin
01/08/2017, 9:38 AMedvin
01/08/2017, 9:39 AMedvin
01/08/2017, 9:39 AMpermalmberg
01/08/2017, 9:48 AMval x = bind { component.observable(IComponent::getX, IComponent::setX) }
and `component`changes, will the binding get updated to the new instance? I guess the answer is 'no', right?edvin
01/08/2017, 10:11 AMyes
. There is magic 🙂edvin
01/08/2017, 10:12 AMcomponent
changes when the binding changes, that is.edvin
01/08/2017, 10:12 AMcomponent
is coming from in the above example, but the binding is reevaluated when the item
is changed, or you call rebind
manually .permalmberg
01/08/2017, 10:16 AMclass Component : IComponent
var component = Component()
val x = bind { component.observable(IComponent::getX, IComponent::setX) }
and then do component = Component()
the binding would be reevaluated?edvin
01/08/2017, 10:20 AMvbox
and hbox
builders so the take a Number
instead of Double
. Now you can write vbox(10)
instead of vbox(10.0)
.edvin
01/08/2017, 10:22 AMset
in your component var to rebind when it happens, or make the view model an ItemViewModel<Component>
. Then you don't need to add the component variable, and item
will represent the component.permalmberg
01/08/2017, 10:25 AMset
? Is that a kotlin feature? in my case component is a POJOedvin
01/08/2017, 11:03 AMvar component = Component()
was defined in the view model, that's why I suggested it. But I think using an ItemViewModel<Component> is much cleaner, if that's an alternative.