FLEX-34854 The spark SortField now extends the mx version, to prevent the need of changing both classes when a bug is fixed or a feature is implemented. NOTES: -this is a result of the mailing list discussion entitled 'Can we unify spark and mx Sort and SortField?'. -the compareFunction getter and setter have been kept only for the asdoc comment to show the differences between the spark and mx SortField. -the spark DataGrid was using AdvancedStyleClient to refer to spark SortFields instead of the interface, IAdvancedStyleClient. This needed to be corrected, because the spark SortField does not extend AdvancedStyleClient anymore. -SortField.stringCompare() and .xmlCompare() needed to be protected (they were private) so that they could be overridden in spark SortField.
FLEX-34884 CAUSE The reason items weren't findable in a collection sorted by complex fields was that Sort.findItem() was going through the field names to make sure that all of them are present on the destination objects. This check failed for complex objects. SOLUTION Instead of checking by itself, Sort.findItem() now delegates this responsibility to the respective ISortFields. In turn, SortField and ComplexSortField can now tell Sort whether an object has a certain property and, respectively, whether an object has the first property in the chain for ComplexSortField (because any part of the chain can be null without meaning the entire chain can never be accessed - it just can't be accessed now).
NOTES -Now the previously added unit test passes. -Also note that in this way Sort.fieldList is no longer needed, which should speed up the fields setter.