Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ufk-dev] ObservableListModel multi element change problem

Hi Tom,

Thank you very much for you update!

But I'm not sure about the fireContentsChanged() call. It informs the
listeners about a model elements change, not about additions/removals.
In my scenario it does not handle addition of multiple elements very well.

I use this code to notify the listeners:

if (oldSize != 0) {
	fireIntervalRemoved(ObservableListModel.this, 0, oldSize - 1);
}
if (newSize != 0) {
	fireIntervalAdded(ObservableListModel.this, 0, newSize - 1);
}

Extremely inefficient, but it works for me.
What do you think?
Thanks!

  Max


Back to the top