LastExceed
12/17/2019, 1:46 PMlistview(blocks) {
setCellFactory {
val cell = ListCell<Block>()
cell.text = cell.item.toString() //nullref here because cell.item is null
return@setCellFactory cell
}
}
how do i get a reference to the item the cell is going to represent so I can set the cell text?Ruckus
12/17/2019, 2:32 PMupdateItem
function of the ListCell
.Ruckus
12/17/2019, 2:34 PMListCell
itself needs to contain logic for what to do when the associated value changes.