arrayCollection sort compareFunction sometimes passes 3 parameters; sometimes 2
my sort comparefunction set this:
private var sort:sort = new sort();
sort.comparefunction = serverstatusarraysort;
sort.fields = null;
serverstatusarray.sort = sort;
serverstatusarray.refresh();
private function serverstatusarraysort(obj1:object , obj2:object):int{
return objectutil.stringcompare(obj1 string, obj2 string, true);
}
sometimes when call refresh, serverstatusarraysort function passed 3 parameters , other times passed 2. how can guarantee pass either 2 or 3?
your structure of sortfunction not proper...the structure of sortfunction this
function [name](a:object ,b:objec, fields:array=null):int
you find example of in link
if post answers question or helps, please kindly mark such.
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment