: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
selectedIndices are Strings???
Don’t forget that the Array.sort() method sorts using string
values by default, so even when sorting an array of numbers or ints, they will
be sorted as if they were strings. To get numeric sorting, so that
“10
simplify my code!
Jim
From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tom Bray
Sent: Thursday, June 08, 2006 1:26
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders]
selectedIndices are Strings???
From the docs on Array.sort():
&quo
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jim Robson
Sent: Thursday, June 08, 2006
10:11 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
selectedIndices are Strings???
Thanks Tom,
I believe array indices are ints
m Bray
Sent: Thursday, June 08, 2006 1:07
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders]
selectedIndices are Strings???
Try either of these two options:
for( var i:int; i <
arr.length; i++ )
{
trace( arr[i] );
, I ended up writing a custom sort function to get around the
issue.
Thanks again!
Jim
From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tom Bray
Sent: Thursday, June 08, 2006 1:07
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders]
selectedIndices are
Try either of these two options: for( var i:int; i < arr.length; i++ ) { trace( arr[i] ); } //or for each( var i:int in arr )
{ trace( i ); }The for...in loop that you're using is for iter
I don’t understand why DataGrid.selectedIndices
returns an array of Strings. I thought that indices were generally integers. (For
example, Array.indexOf returns an int.)
Can anyone explain why the selected index of a DataGrid is a
String?
When “dgTest” is a DataGrid instance, the
follo
7 matches
Mail list logo