Hoping someone can help me with this as I've done some scratching & searching I'm still overlooking something obvious... I've defined a simple enumerated data type:
typedef enum {
kLow = -1,
kMid,
kHigh
} MyMode;
And made an instance variable of this type in my ClassA:
@interface ClassA : UIView {
MyMode myMode;
}
@property (nonatomic) MyMode myMode;
@end
And then myMode is synthesized in the @implementation. Now in another class I reference ClassA
@interface ClassB : UIView {
ClassA *classA;
}
@property (nonatomic, retain) ClassA *classA;
@end
Finally, in a method w/in ClassB I'd like to test for the state of ClassA's myMode property. I've tried
if (classA.myMode == kLow)
and this gives me the "request for member in something not a structure or a union" error. Casting didn't make a difference.
if ([classA myMode] == kLow)
gives me a "No '-myMode' method found".
I believe my headers and includes are correct.