|
I don’t believe we’ve said
anything yet. I’m hopeful it’s before the end of the month. Matt From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Harald Dehn Thanks Matt, so I am waiting for B2.
Is there any public information about the date you are publishing B2? Harry Von:
[email protected] [mailto:[EMAIL PROTECTED] Im Auftrag von Matt Chotin Yes, the docs are wrong on b1 on the
signature. If you provided a custom comparator in b1 it may be that you
need to know whether you wanted ascending or descending though I thought we
were handing it correctly. I’m pretty sure it behaves correctly in
b2 though. Matt From: Hello, I do have some problemens with a custom sort compare
function in a DataGrid. In the Columnn I like to sort birthdates of persons.
Regarding the manunal the callback function should have the following signature mySortCompareFunction(obj1 :
Object, obj2
: Object, columnIndex
: Number) : Number With this signature I get the following error message ArgumentError: Error
#1063: Argument count mismatch on CellRenderer::DateCellRenderer/Compare().
Expected 3, got 2
at mx.collections::Sort/mx.collections:Sort::internalCompare()
at Array/sort()
[…] So I tried the following function with only two
arguments:
var _ColumnName:String = “birthDate”;
public function Compare(pRow1:Object,
pRow2:Object):Number {
var _T1:Number;
var _T2:Number;
if( pRow1[_ColumnName] == null ) {
if( pRow2[_ColumnName] == null )
return 0;
else
return -1;
}
else _T1 = pRow1[_ColumnName].time;
if( pRow2[_ColumnName] == null )
return 1;
else {
_T2 = pRow2[_ColumnName].time;
if( _T1 < _T2 ) return -1;
if( _T1 > _T2 ) return 1;
return 0;
}
} This works fine with one exception; the rows are
always sorted ascend, even when the “sort arrow” indicates that the
rows should be sorted descant. Where is my mistake? Harry
|

