Re: Core Data & IB in prefs pane ("Cannot perform operation without a managed object context")
Re: Core Data & IB in prefs pane ("Cannot perform operation without a managed object context")
- Subject: Re: Core Data & IB in prefs pane ("Cannot perform operation without a managed object context")
- From: Keary Suska <email@hidden>
- Date: Sat, 29 Mar 2008 17:17:27 -0600
- Thread-topic: Core Data & IB in prefs pane ("Cannot perform operation without a managed object context")
on 3/28/08 2:18 PM, email@hidden purportedly said:
> I'm clearly missing some link in the whole Core Data thing. I'm trying
> to use it in a Prefs Pane. I've written no code, just set things up
> with the data model editor and IB. Is there something NSDocument does
> to support Core Data that an NSPrefsPane wouldn't do by default?
Do you mean NSPersistentDocument? NSDocument doesn't support Core Data, in
and of itself, as far as I know.
> Basically, when I click my "add" button, although it's wired to
> NSArrayController's add: action, it doesn't seem to actually add
> anything. I get "3/28/08 1:17:58 PM System Preferences[7428] Cannot
> perform operation without a managed object context". I think I get
> what that's telling me, but how do I set one up?
Did you bind the NSArrayController's managedObjectContext? This is the most
common reason for this error, AFAIK. You may also want to make sure the
binding doesn't return nil. Could also cause this problem, maybe. Don't know
for sure.
> In the tutorial, it seemed to "just work," and I didn't set anything
> up explicitly. Thanks!
Well, you did actually, but it may not have been entirely obvious, and you
may not have completely understood each step you took.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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