View Full Version : [Resolved] @Synthisize Error message?

Dec 3, 2011, 05:31 PM
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!


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
#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;


#import "Item.h"

@implementation Item
@synthesize name;
@synthesize size, location, date, image;