edvin
08/26/2017, 7:04 PMedvin
08/26/2017, 7:11 PMedvin
08/26/2017, 7:11 PMedvin
08/26/2017, 7:11 PMedvin
08/26/2017, 7:11 PMedvin
08/26/2017, 7:30 PMedvin
08/26/2017, 7:31 PMaddChildIfPossible
call, which is used by the builders to add children to their parent.devanand
08/26/2017, 7:32 PMedvin
08/26/2017, 7:33 PMdevanand
08/26/2017, 7:33 PMedvin
08/26/2017, 7:34 PMedvin
08/26/2017, 7:34 PMvar addChildInterceptor: (parent: EventTarget, node: Node, index: Int?) -> Boolean = { _, _, _ -> false }
edvin
08/26/2017, 7:41 PMedvin
08/26/2017, 7:41 PMFX.addChildInterceptor = { parent, node, index -> if (parent is MigPane) { parent.add(node, CC()); true } else false }
edvin
08/26/2017, 7:42 PMedvin
08/26/2017, 7:57 PMedvin
08/26/2017, 7:59 PMdevanand
08/26/2017, 8:05 PMdevanand
08/26/2017, 8:05 PMdevanand
08/26/2017, 8:06 PMedvin
08/26/2017, 8:09 PMmatthjes
08/27/2017, 12:55 PMclass MainControl : JsonModel {
val controlProperty = SimpleDoubleProperty(0.0)
var control by controlProperty
override fun toJSON(json: JsonBuilder) {
with(json) {
add("controlValue", control)
}
}
}
class MainControlModel : ItemViewModel<MainControl>() {
val mainControl = bind(MainControl::controlProperty)
}
class MainController : Controller() {
private val api: Rest by inject()
private val control: MainControlModel by inject()
init {
with(api) {
baseURI = "<http://localhost:8090>"
}
control.mainControl.addListener { _, _, _ ->
LOG.debug("{}", control.item)
<http://api.post|api.post>("control", control.item)
}
}
}
But control.item
is always null? How can I do this?matthjes
08/27/2017, 1:31 PMedvin
08/27/2017, 1:32 PMedvin
08/27/2017, 1:32 PMedvin
08/27/2017, 1:33 PMedvin
08/27/2017, 1:33 PMedvin
08/27/2017, 1:34 PMedvin
08/27/2017, 1:34 PMmatthjes
08/27/2017, 1:35 PM