Re: NSManagedObject class method error
Re: NSManagedObject class method error
- Subject: Re: NSManagedObject class method error
- From: "ad veloper" <email@hidden>
- Date: Mon, 8 Oct 2007 19:09:31 +0100
mmalc wrote:
> Because the managed object context couldn't find a managed object model.
:) - Yes, sorry. I assume too much. My reporting of the error was
based upon my assumption that everything was in place as per Chris's
reply (below), due to the way the App is configured, but you couldn't
guess that!
Anyhow. Turns out that the delegate is not set, as I previously
thought it was, which means I broke it somehow, because inserting the
entity by passing the MOC as an argument solved the problem. Chris's
was by far the obvious thing to check first, as mine was a bit
longwinded.
>
> Are you sure that at the time this method is invoked, [NSApp delegate]
> returns a fully-configured delegate, and that delegate can return its
> managed object context?
>
> If you're invoking this before your main nib file is loaded, and
> that's where your application's delegate is configured, that would
> explain what you're seeing.
>
> -- Chris
>
>
Thanks.
_______________________________________________
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