Core Data Problem
Steven Hatfield
stevenhatfield at mac.com
Wed Jan 9 05:05:37 PST 2008
Hi All,
I am a newbie ObjC/Cocoa programmer, and I have a small core data
application that I am writing. Everything works fine when the user
enters data - save/open, display, etc.
Where I am running into a problem is when the NSManagedObject needs to
set some data; I simply can't get the methods to be called.
I used Xcode to generate the Managed Object Class, which includes the
code:
@interface Listing (CoreDataGeneratedAccessors)
- (void)addListItemsObject:(ListItem *)value;
- (void)removeListItemsObject:(ListItem *)value;
@end
in the interface file, and I called the method in the implementation
file:
- (void)addListItemsObject:(ListItem *)value
{
NSLog(@"Here");
}
I have verified that the "awakeFromInsert:" method is called on that
class, and the code compiles fine, but I never see "Here" in the
console and when I put a breakpoint on the NSLog() line, it is never
hit.
In the code listings in the NSPersistentDocumentTutorial, it appears
that this should work fine... what am I doing wrong?
I appreciate any help.
TIA,
Steven
More information about the MacOSX-dev
mailing list