I found my mistake and such a stupid one to make. I declared my ivars in the wrong area and forgot to use brackets {}. it works. funny how I struggle with it for hours and then as soon as I post for help I discover the answer!
Sorry.
I have not seen this before? I checked the spelling of all of my instance variables and I get this error message for all of the instance variables.
Header file
.m
Sorry.
I have not seen this before? I checked the spelling of all of my instance variables and I get this error message for all of the instance variables.
Synthesized property 'name' must either be named the same as a compatible ivar or must explicitly name an ivar
Header file
Code:
#import <Foundation/Foundation.h>
NSString *name;
NSNumber *size;
NSString *location;
NSString *date;
NSImage *image;
@interface Item : NSObject
@property (copy) NSString *name;
@property (copy) NSString *size;
@property (copy) NSString *location;
@property (copy) NSString *date;
@property (copy) NSImage *image;
@end
.m
Code:
#import "Item.h"
@implementation Item
@synthesize name;
@synthesize size, location, date, image;
@end
Last edited: