Actually, i was doing something wrong somewhere, a...
# tornadofx
s
Actually, i was doing something wrong somewhere, and finally ended up with:
Copy code
fun <T> Pane.bindChild(prop: Property<T>, op: (T) -> UIComponent) {
    replaceChildren(op(prop.value))
    prop.onChange {
        replaceChildren(op(it!!))
    }
}