Objective-C properties are not being recognized in header file?
Posted
by Greg
on Stack Overflow
See other posts from Stack Overflow
or by Greg
Published on 2010-05-24T17:39:53Z
Indexed on
2010/05/24
17:41 UTC
Read the original article
Hit count: 253
Hey folks, I wonder if I'm doing something completely stupid here... I'm clearly missing something. I've gotten used to the pattern of defining properties of a custom class, however I seem to be hitting a point where extended classes do not recognize new properties. Case of point, here's my header file:
import
import "MyTableViewController.h"
@interface MyRootController : MyTableViewController { NSMutableArray *sectionList; }
@property (nonatomic, retain) NSMutableArray *sectionList; @end
Now, for some reason that "sectionList" property is not turning green within my interface file (ie: it's not being recognized as custom property it seems). As a result, I'm getting all kinds of errors down in my implementation. The first is right at the top of my implementation where I try to synthesize the property:
import "MyRootController.h"
@implementation MyRootController @synthesize sectionList;
That synthesize line throws the error "No declaration of property 'sectionList' found in the interface". So, this is really confusing. I'm clearly doing something wrong, although I can't put my finger on what.
One thought: I am extending another custom class of my own. Do I need to specify some kind of super-class declaration to keep the architecture from getting sealed one level up?
Thanks!
© Stack Overflow or respective owner