RE: [flexcoders] selectedIndices are Strings???

2006-06-08 Thread Jim Robson
: 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

RE: [flexcoders] selectedIndices are Strings???

2006-06-08 Thread Jim Robson
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

RE: [flexcoders] selectedIndices are Strings???

2006-06-08 Thread Francis Cheng
    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

Re: [flexcoders] selectedIndices are Strings???

2006-06-08 Thread Tom Bray
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] );          

RE: [flexcoders] selectedIndices are Strings???

2006-06-08 Thread Jim Robson
, 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

Re: [flexcoders] selectedIndices are Strings???

2006-06-08 Thread Tom Bray
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

[flexcoders] selectedIndices are Strings???

2006-06-08 Thread Jim Robson
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