Subclass not seeing superclass' instance variable

Posted by hyn on Stack Overflow See other posts from Stack Overflow or by hyn
Published on 2010-06-03T05:01:51Z Indexed on 2010/06/03 5:04 UTC
Read the original article Hit count: 272

Filed under:

I have a situation where my subclass is not seeing the superclass' instance variable x. The ivar is obviously @protected by default, so why do I get a compiler error "x undeclared"? If I make this ivar a property then I can access it by self.x. What's worse is sometimes the error disappears, so something in my code is obviously causing this error but I cannot figure it out.

© Stack Overflow or respective owner

Related posts about objective-c