Core Data Problem

Christiaan Hofman cmhofman at gmail.com
Wed Jan 9 05:16:12 PST 2008


You've detailed the code part, but you didn't tell us what you did to  
test it. So we still do not know what actually failed. It may well be  
that your expectations are wrong. In fact, that seems to be the case  
from your explanation. You say that you have problems when the  
"NSManagedObject needs to set some data". That usually means changing  
a property. Than you go on describing methods to modify a  
relationship. So what are you actually modifying?

Christiaan

On 9 Jan 2008, at 2:05 PM, Steven Hatfield wrote:

> 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
> _______________________________________________
> MacOSX-dev mailing list
> MacOSX-dev at omnigroup.com
> http://www.omnigroup.com/mailman/listinfo/macosx-dev



More information about the MacOSX-dev mailing list