I have a subclass of NSManagedObject created by the Xcode model interface.
This class has some members NSString and NSNumber, as well as a member of NSDate.
When I try to set an NSDate member, I get the following exception:
2009-10-12 21:53:32.228 xxx[2435:20b] Failed to call designated initializer on NSManagedObject class 'Item'
2009-10-12 21:53:32.228 xxx[2435:20b] *** -[Item setDate:]: unrecognized selector sent to instance 0x3f7ed30
2009-10-12 21:53:32.229 xxx[2435:20b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[Item setDate:]: unrecognized selector sent to instance 0x3f7ed30'
The date parameter is similar to the rest, except that instead of
@property (nonatomic, retain) NS{String,Number}* propname;
it a
@property (nonatomic, retain) NSDate *date;
Btw, the instance of the Item that I am assigning is just an ordinary [[Item alloc] init] , unrelated context, or something else.
At first I thought that my NSDate * was wrong, then I tried to assign it [NSDate date] and even nil. He is still falling.
Any ideas?
objective-c iphone cocoa-touch core-data
Prody
source share