Hi Martin,

I understand. In Perl there isn't any order in hashes (associative arrays)
either:

     foreach my $key (keys %hash) {
         print "$key\n";
     }

does not give you any particular order.

Therefore you do

     foreach my $key (sort keys %hash) {
         print "$key\n";
     }

(assuming you want alphabetical order, for numerical order you'd have to
specify a sort routine, similar to what sort() in JS does).

Note, the sorting is done by sorting the indices to the hash (called keys in
Perl).

Cheers,
Fritz

On Mon, 19 Jul 2010, MartinWittemann wrote:

>
> Hello Fritz,
> the JS spec does not say that an object has an order which gives the browser
> vendors the possibility to do "optimizations" like google does:
>
> http://code.google.com/p/chromium/issues/detail?id=37404
>
> So I would sure not count on an order in JS objects.
>
> Regards,
> Martin
>

-- 
Oetiker+Partner AG              tel: +41 62 775 9903 (direct)
Fritz Zaucker                        +41 62 775 9900 (switch board)
Aarweg 15                            +41 79 675 0630 (mobile)
CH-4600 Olten                   fax: +41 62 775 9905
Schweiz                         web: www.oetiker.ch

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to