How i can add listener for selectedValue , that wo...
# tornadofx
r
How i can add listener for selectedValue , that works when mouse click to combobox item, rather than in the updateItem
c
You should factor out the value as a property and bind to that. Usually don’t need to add listeners like you would in Swing. Pass the property as a first value in the Builder function.
r
something like this ?
Copy code
column("Printer", Printer::myCustomProperty)

var myCustomProperty: String = "Default"
        get() {
            println("myCustomProperty getter")
            return field
        }
        set(value) {
            println("myCustomProperty setter'")
            field = value
        }
c
Hadn’t realized it was in a TableView; will post some code later if someone doesn’t beat me to it