Ruckus
11/03/2016, 6:14 PMvoddan
11/03/2016, 6:17 PMObservableList.withIndex()
so that the result is also observable?gtnarg
11/03/2016, 6:19 PMcellFormat
to workgtnarg
11/03/2016, 6:20 PMRuckus
11/03/2016, 6:20 PMvoddan
11/03/2016, 6:21 PMcellFormat {
graphic = hbox {
label(index) // <--???
label(it.fmtHex())
}
}
Ruckus
11/03/2016, 6:23 PMlist.indexOf(it)
, but that looks it would be better suited in a TableView
or something.voddan
11/03/2016, 6:24 PMcarlw
11/03/2016, 6:28 PMvoddan
11/03/2016, 6:30 PMindex
alongside with the valuecarlw
11/03/2016, 6:35 PMcarlw
11/03/2016, 6:36 PMgtnarg
11/03/2016, 6:36 PMListView
the same in the ObservableList
?voddan
11/03/2016, 6:37 PMlabel(index.toString)
, but that does not change the matter.
@gtnarg yes, absolutelyRuckus
11/03/2016, 6:38 PM"$index "
carlw
11/03/2016, 6:38 PMcarlw
11/03/2016, 6:39 PMgtnarg
11/03/2016, 6:40 PMListCell
you can call getIndex()
gtnarg
11/03/2016, 6:40 PMvoddan
11/03/2016, 6:42 PMindex
come from?carlw
11/03/2016, 6:42 PMvoddan
11/03/2016, 6:42 PMindex
, nether ListCell
voddan
11/03/2016, 6:43 PMcarlw
11/03/2016, 6:43 PMvoddan
11/03/2016, 6:48 PMvoddan
11/03/2016, 6:48 PMvoddan
11/03/2016, 6:52 PMindex
is available without knowing itedvin
11/03/2016, 7:03 PMedvin
11/03/2016, 7:06 PMcellFormat
closure operates on the ListCell
and since ListCell
extends IndexedCell
it has access to IndexedCell.getIndex()
.ron
11/03/2016, 10:22 PM