FLEX-34979 CAUSE: The transformation of the spark Sort and SortField from extending AdvancedStyleClient to implementing its interfaces and using an instance of it as a class member had some more bugs: -the id setter didn't exist -when AdvancedStyleClient dispatched an event, Sort / SortField didn't pick up on it and dispatch forward -When AdvancedStyleClient initialized it added itself as a styleClient to the document. This is undesired for Sort and SortField because from then on the style code would used the AdvancedStyleClient member instead of the Sort / SortField instances, as before, which meant that their relevant functions (such as setStyle or styleChanged) were never called. SOLUTION: -there is now an id setter in AdvancedStyleClientImplementation -AdvancedStyleClient_ was introduced to be able to override some functions of AdvancedStyleClient -Sort and SortField now listen to the events dispatched via their AdvancedStyleClient_ member and pass on the events if there's a listener for them -on initialization we now add the Sort / SortField instances as styleClients to the document instead of their AdvancedStyleClient members, which should now be hidden from any code interacting with Sort and SortField (this is achieved in AdvancedStyleClient_) -all the instances where AdvancedStyleClient interacted with the StyleProtoChain using 'this' were changed into using the Sort / SortField instances
NOTES: -Since some of the public functions in AdvancedStyleClient (getStyle, setStyle, styleChanged) are also called internally from other AdvancedStyleClient functions (or could be, in the future), and we need them to hit the Sort / SortField implementations instead, AdvancedStyleClient_ now overrides those functions and makes sure that the Sort / SortField versions are called. -AdvancedStyleClient.setDeferredStyles() was made protected so that AdvancedStyleClient_.as can override it to make sure that StyleProtoChain.setStyle is always called referring to Sort or SortField instead of the instance of AdvancedStyleClient_ they use internally.