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" wrote: > On Oct 5, 2:39 pm, Shane McCarron 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 d

[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 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 a number that yo

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 hash

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

2011-10-05 Thread T.J. Crowder
On Oct 4, 5:38 pm, surge 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 if I want to