in reply to Re: Localizable / customizable 'each' iterator for hashes
in thread Localizable / customizable 'each' iterator for hashes

The idea is that if the iterator already has a value, I don't want to change that value automatically blindly. I'm allowing the iterator to be pre-set prior to the first call to FIRSTKEY. The only time I want to set the iterator to zero, is if it has already reached the last key (I do this check elsewhere), or if it has not yet been set at all. Try it out, it works. :)

By the way, I should mention that this class is pretty much unneeded. Anytime the functionality of this type of class could be needed, it could be accomplished more easily by creating an external keys list with keys, and iterating over that list. I really just wanted to see if I could figure out how to make it work internally via each. It works, but it's ugly and unwieldy.


Dave

  • Comment on Re^2: Localizable / customizable 'each' iterator for hashes

Replies are listed 'Best First'.
Re^3: Localizable / customizable 'each' iterator for hashes
by ysth (Canon) on Jul 20, 2004 at 01:07 UTC
    Sorry, I should have taken time to try it (which I still have not yet done :).