Luca Nicoletti
09/01/2019, 10:05 AM@Model
class which has a list, adding elements to that list don’t trigger the drawing of the model on the screen. In order to have it working I added a counter
to that model class. Increasing that counter
whenever I add something to the list triggers the drawing of the model on the screen. (https://gist.github.com/lnicolet/039d2fe76e19e859582e32625ac411e7, https://gist.github.com/lnicolet/cb49c5a4021efc3b784bf95ec5755321). Working and not working examples in the links. Is there a different way to have it working with lists
?themishkun
09/01/2019, 1:06 PM@Model
tracks only changes of its properties. You are using MutableList
, so you don't trigger property setter. Use List
instead and you will be fineLuca Nicoletti
09/01/2019, 1:32 PMisDone
to trigger an updateshikasd
09/01/2019, 4:12 PM@Model
on such classes as well.Luca Nicoletti
09/01/2019, 4:12 PMthemishkun
09/02/2019, 3:19 PM@Pivotal
annotation does something like thiswasyl
10/22/2019, 8:46 AM