On Sun, Feb 20, 2011 at 1:23 PM, Shane
<[email protected]> wrote:
> Trying to learn core data and I have added it to my application while
> swapping out my old ways. So I have this initially ...
>
> @synthesize managedCoreDataObjectContext;
>
> - (void) awakeFromNib
> {
>        ...
>        [self setManagedCoreDataObjectContext:[[NSManagedObjectContext alloc] 
> init]];
> }
>
> - (void) applicationDidFinishLaunching:(NSNotification *) aNotification
> {
>        NSManagedObjectContext *context = [self managedCoreDataObjectContext];
>
>        // error is happening on this next line …
>        network = [NSEntityDescription
>                insertNewObjectForEntityForName:@"Network"
>                inManagedObjectContext:context];
> }

Since we have no idea where self.managedCoreDataObjectContext gets
set, I'm can only make a wild leap that -managedCoreDataObjectContext
is returning nil.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to