mikehearn
05/10/2017, 3:27 PMmikehearn
05/10/2017, 3:27 PMmikehearn
05/10/2017, 3:27 PMmikehearn
05/10/2017, 3:28 PMmikehearn
05/10/2017, 3:28 PMedvin
05/10/2017, 3:28 PMedvin
05/10/2017, 3:28 PMmikehearn
05/10/2017, 3:28 PMnimakro
05/10/2017, 3:28 PMListCellFragment
but when I access the item
inside the ListCellFragment
it is always null🙈mikehearn
05/10/2017, 3:29 PMmikehearn
05/10/2017, 3:29 PMedvin
05/10/2017, 3:29 PMinit
, while it will only later be assigned a value.mikehearn
05/10/2017, 3:29 PMedvin
05/10/2017, 3:29 PMedvin
05/10/2017, 3:30 PMitemProperty.onChange
to react to when it gets a value, but it's far better to use a viewmodel, bound to the itemProperty of the ListCellFragment, and bind your UI to that directly in init or while building the root node.edvin
05/10/2017, 3:30 PMval model = MyItemModel(itemProperty)
edvin
05/10/2017, 3:31 PMnimakro
05/10/2017, 3:33 PM5. Data Controls
chapter...edvin
05/10/2017, 3:34 PMnimakro
05/10/2017, 3:35 PMedvin
05/10/2017, 4:38 PMedvin
05/10/2017, 6:24 PMcellCache
. It is wasteful with regards to both memory and CPU. When cellFormat
isn't enough, I think ListCellFragment
is the right solution. It uses only slightly more memory than a custom ListCell implementations and has many benefits.edvin
05/10/2017, 6:25 PMListCellFragment
using builders instead, so the ceremony is reduced a little, although it is actually nice to get the ListCell UI code out of the builder hierarchy that defines the ListView.edvin
05/10/2017, 6:49 PMcellCache
where it really should have talked about cellFormat
, and didn't mention the ListCellFragment
. Sorry about that @mikehearn - I see now why the guide sent you on the wrong path. Updating now.kastork
05/10/2017, 7:22 PMJsonModel
, not a kotlin data class, changes, then should not that change propagate through the associated ItemViewModel
which is backed by that data class and thence into the view (in this case, a Table)carlw
05/10/2017, 7:58 PMcarlw
05/10/2017, 7:59 PMkastork
05/10/2017, 8:00 PMcarlw
05/10/2017, 8:01 PMkastork
05/10/2017, 8:02 PM