is there a simple way to "step" through enums? I have a button that I want
to click and have it "cycle" through a set of states defined by enums but
the only way I can think of doing this "properly" yet "ugly" is to test the
state for each state. I know that enumes are not ordered but since they are
"stored" as numbers they have an inherent ordering which can be used. I
don't really care about the ordering though but just the ability to step
through them.
Obviously I could define my first entry as, say, equivilent to 0 and the
last as n and then simply treat them as numbers but this doesn't seem
elegant.
Thanks,
Jon