2 Replies Latest reply on Jul 8, 2010 12:59 PM by iamcootis

    arrayCollection sort compareFunction sometimes passes 3 parameters; sometimes 2

    iamcootis Level 1

      My sort compareFunction is set up like this:


      private var sort:Sort = new Sort();

      sort.compareFunction = serverStatusArraySort;

      sort.fields = null;
      serverStatusArray.sort = sort;



      private function serverStatusArraySort(obj1:Object , obj2:Object):int{
                 return ObjectUtil.stringCompare(obj1 as String, obj2 as String, true);


      Sometimes when I call the refresh, the serverStatusArraySort function will be passed 3 parameters and other times it will be passed 2. How can I guarantee that it will always pass either 2 or 3?