I opted for the 3rd option, It worked like a charm.

 

The 1) wouldn’t work since I wanted to sort columns differently (some caseInsensitive asc, other numeric desc, etc)

 

Thanks Matt

 

João Fernandes

Secção de Desenvolvimento

Departamento de Informática


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Chotin
Sent: quarta-feira, 1 de Fevereiro de 2006 13:31
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Array.SortOn Error (Flex 1.5)

 

The intrinsic for Array that shipped with 1.5 expected the second option to be the number use-case (and therefore you’re going to need to use the | operator).  You can work around this by

1)       using the | operator

2)       using a temporary variable typed as Object

3)       go edit Array.as in web-inf/flex/ system_classes to change the type of options to Object.

 

Matt

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of João Fernandes
Sent: Wednesday, February 01, 2006 8:09 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Array.SortOn Error (Flex 1.5)

 

Hi there,

 

I was trying to sort an array like the documentation says

 

“Flash Player 8 added the ability to specify a different sorting option for each field when you sort by more than one field. In Flash Player 8, the options parameter accepts an array of sort options such that each sort option corresponds to a sort field in the fieldName parameter. The following example sorts the primary sort field, a, using a descending sort; the secondary sort field, b, using a numeric sort; and the tertiary sort field, c, using a case-insensitive sort:

Array.sortOn (["a", "b", "c"], [Array.DESCENDING, Array.NUMERIC, Array.CASEINSENSITIVE]);”
 
But when I try this I got this error during compiling:

 

Type mismatch. Array found where Number was expected in parameter 2

 

Any toughts?

 

Thanks

 

João Fernandes

Secção de Desenvolvimento

Departamento de Informática

 





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to