legacy-segall
09-08-2003, 04:39 AM
I want to share an enum between multiple classes that are separate in the class tree, so I created a class derived from Object and put the enum in there. In all the classes where I need to know about this enum, I include the dependson(common) specifier in the class declaration. Then I use "var common.theEnum myEnum;" wherever I need it. That's the way that feature works, AFAIK.
Here's the part that's screwed up. I have one class derived from Actor, one class derived from Pawn, and both need to know about the enum, so I made them both depend on the common class. But it works for the one derived from Pawn but not for the one derived from Actor! I can't see how these classes differ in such a way that would cause this behavior. In fact, I can't see anything at ALL that would account for it.
I even tested it on another of my classes that derives straight off Actor, and that worked. I made it depend on the common class and tried to create an instance of the common enum, and it worked fine. Clearly, WTF is going on?
I could just locally copy the enum into the class where it doesn't work, but that's pretty sloppy. I just want to know why it isn't working when I do it The Right Way (tm).
Can provide source files, but maybe someone already knows the answer...
edit - forgot to actually mention the error description: Error, Unrecognized type 'theEnum' within 'common'
Here's the part that's screwed up. I have one class derived from Actor, one class derived from Pawn, and both need to know about the enum, so I made them both depend on the common class. But it works for the one derived from Pawn but not for the one derived from Actor! I can't see how these classes differ in such a way that would cause this behavior. In fact, I can't see anything at ALL that would account for it.
I even tested it on another of my classes that derives straight off Actor, and that worked. I made it depend on the common class and tried to create an instance of the common enum, and it worked fine. Clearly, WTF is going on?
I could just locally copy the enum into the class where it doesn't work, but that's pretty sloppy. I just want to know why it isn't working when I do it The Right Way (tm).
Can provide source files, but maybe someone already knows the answer...
edit - forgot to actually mention the error description: Error, Unrecognized type 'theEnum' within 'common'