[Proto-Scripty] Re: The order of iteration with Hash objects.

2011-10-06 Thread T.J. Crowder
On Oct 5, 2:39 pm, Shane McCarron halindr...@gmail.com wrote: If the sorted order of the hash keys isn't what you want, you might also consider assigning ordinals as part of the hash key.  Assuming you have less than 1 hash keys, I would do something like _myKey as a key, where is

Re: [Proto-Scripty] Re: The order of iteration with Hash objects.

2011-10-06 Thread Shane McCarron
Yes. Of course. On Oct 6, 2011 10:54 AM, T.J. Crowder t...@crowdersoftware.com wrote: On Oct 5, 2:39 pm, Shane McCarron halindr...@gmail.com wrote: If the sorted order of the hash keys isn't what you want, you might also consider assigning ordinals as part of the hash key. Assuming you have

[Proto-Scripty] Re: The order of iteration with Hash objects.

2011-10-05 Thread T.J. Crowder
On Oct 4, 5:38 pm, surge gera...@gmail.com wrote: I have this nasty problem with hashes. IE 8 disregards the order of hash element declarations and when I do hash_name.each(), the result is out of order so to speak -- although I know that the order is not guaranteed. What's the best solution

Re: [Proto-Scripty] Re: The order of iteration with Hash objects.

2011-10-05 Thread Shane McCarron
If the sorted order of the hash keys isn't what you want, you might also consider assigning ordinals as part of the hash key. Assuming you have less than 1 hash keys, I would do something like _myKey as a key, where is a number that you increase each time you put an item into the