|Posted by Dwayne Robinson||PermalinkReply|
How can you simulate enumeration inheritance so that later enums can automatically adopt all the constants of an earlier one?
Application: I have basic messages that all GUI objects support and more specific messages to each type. Obviously a Button should messages specific to Lists (and vice versa) but they both understand things like redraw, move, destroy...
I could fully qualify the enum reference every time I wanted to use something from the main class, but ... I'm in no hurry to develop carpal tunnel :) I could use mixins except they don't seem to work for enums (complains about items separated by commas rather than semicolons).
Ideas? (I'm using enums for good reason)