I’ve fixed it with this: ```selectionModel.selecte...
# tornadofx
c
I’ve fixed it with this:
Copy code
selectionModel.selectedItemProperty().addListener { _, _, new ->
            if (new != null) {
                val sel = selectionModel.selectedItemProperty().value
                when (sel){
                    is ItemViewInstance.Item1 -> println(sel.item1.id)
                    is ItemViewInstance.Item2 -> println(sel.item2.id)
                    else -> throw Exception("$sel")
                }
                }
        }
works awesome