I have a Owners class defined that is used just fine in existing classes.
I tried to add another class, and no matter what I do (deleted, recreated new class, copied other class files over and renamed, cleaned all targets, howled at the moon), I cannot use this particular class in any new files I create.
The class is simple with a singleton definition of an array.
Here it is in use in another class (just fine):
#import "OwnersSchema.h"
#import "Owners.h"
#import "Constants.h"
@implementation OwnersViewController
@synthesize mid,imageStore;
- (OwnersSchema *)OwnersForIndexPath:(NSIndexPath *)indexPath {
return [[Owners sharedOwners].ownersArray objectAtIndex:indexPath.row];
}
So I make an exact copy of the above header and make files, just rename interface, etc. and add the same exact code, and it claims Owners is undeclared: First use in function.
I can add other class definitions to the new file and it sees them just fine.
Here is the Owners class:
#import <UIKit/UIKit.h>
#import "URLConnection.h"
@class OwnersSchema;
@interface Owners : NSObject <URLCacheConnectionDelegate> {
NSMutableArray *ownersArray;
NSString *lastUpdated;
NSString *url;
NSString *dbpath;
}
@property (nonatomic,retain) NSString *dbpath;
@property (nonatomic,retain) NSMutableArray *ownersArray;
@property (nonatomic,retain) NSString *lastUpdated;
@property (nonatomic,retain) NSString *url;
-(void)saveOwnersArray;
+ (Owners *)sharedOwners;
@end
I don't get it. I just want to create another viewcontroller. Is there some limitation on the number of files or class inclusions (actually, I use this Owners class in only a few places). And why does it work everywhere else except for the new class I'm trying to create?