Re: could not locate an NSManagedObjectModel
Re: could not locate an NSManagedObjectModel
- Subject: Re: could not locate an NSManagedObjectModel
- From: Shane <email@hidden>
- Date: Sun, 20 Feb 2011 15:48:58 -0600
>
> Since we have no idea where self.managedCoreDataObjectContext gets
> set, I'm can only make a wild leap that -managedCoreDataObjectContext
> is returning nil.
>
I thought by including the property that shows it's being synthesized
would show that, and maybe this is where I've gone wrong. I have added
a property to my apps main controller …
@property (retain) NSManagedObjectContext *managedCoreDataObjectContext;
I thought it was being set by doing …
[self setManagedCoreDataObjectContext:[[NSManagedObjectContext alloc] init]];
… in the awakeFromNib method of my apps main controller. And then
elsewhere, in applicationDidFinishLaunching: I'd grab that
managedCoreDataObjectContext by ...
NSManagedObjectContext *context = [self managedCoreDataObjectContext];
And use it. Just before I call insertNewObjectForEntityForName:: I can
see that context is not nil.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden