Funny.   I didn't realize we were talking about iterating arrays with for..in 
until just now.  I don't think we do that in Flex code.  If the docs say arrays 
will iterate via for..in in index order then I'd probably trust that, 
especially if you stuff your arrays in index order

From: [email protected] [mailto:[email protected]] On Behalf 
Of Dave Cragg
Sent: Thursday, December 11, 2008 3:08 AM
To: [email protected]
Subject: Re: [flexcoders] Re: speed of the "for each" looping


Could you clarify this? Does this non-guarantee apply to numerically indexed 
arrays and ArrayCollections too? Or just to associative arrays and object 
properties?

The docs imply that the order is maintained by for...in with numerically 
indexed arrays. It would be a big change if that were not the case.

Cheers
Dave

On 10 Dec 2008, at 23:00, Gordon Smith wrote:



So don't use for..in or for each... in if you care about the enumeration order. 
It could very possibly change in future versions of the Flash Player.
                                                                                
                                                                         &nbs! 
p;
Gordon Smith
Adobe Flex SDK

Reply via email to