I’m trying to build some old ActionScript code I just inherited, that I think was originally written for an older version of flex, and I’m just starting to learn the language. I’m getting an error on the following line that I don’t know how to fix.
import mx.collections.ArrayCollection;
import mx.collections.Sort;
// ...
public var actualModelList : ArrayCollection = new ArrayCollection();
// ...
var actualSort : Sort = actualModelList.sort;
1118: Implicit coercion of a value with static type mx.collections:ISort to a possibly unrelated type mx.collections:Sort.
I’mm assuming that Sort implements an interface, ISort, but in other languages I’ve worked with, this assignment seems legit. What’s wrong with this code?
This did the trick: