> collection.sort but nothing happens until the call refresh(). This is
> helpful if you have to make several changes to the sort (rather than just a
> one line change to sort.fields) as it avoids multiple re-sorts on a
> partially set up sort.
that's true, and in the vast majority of cases it can easily be
achieved by setting up all the Sort fields and flags at start, and
then just assigning it to the collection.

The big issue is that if refresh() isn't called at all, or in time (as
was the case with FLEX-34838[1]), then any calls to getItemIndex() or
removeItem() or removeAll() are very likely to throw errors, for
apparently mysterious reasons (the non-mysterious reason being that
the collection is using the new Sort options to search for items,
believing that they are correctly sorted with these options, rather
than the old ones).

[1] https://issues.apache.org/jira/browse/FLEX-34838

Reply via email to