Skip navigation.
 
mlCore Data & IB in prefs pane ("Cannot perform operation without a managed object context")
FROM : Rick Mann
DATE : Fri Mar 28 21:18:59 2008

I didn't get any responses, so I'm trying again.

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?

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?

In the tutorial, it seemed to "just work," and I didn't set anything 
up explicitly. Thanks!


----------------------------
Original message:

I'm trying to use what I learned yesterday about Core Data in a System 
Prefs pane. I created an Entity data model, and then tried to add an 
NSTable and some buttons and wire them up the same way I'd seen the 
Core Data Entity tool do it in IB. But, it didn't work.

So I tried using the Core Data Entity tool to let IB do it, and it 
disables the Add and Remove buttons.

The only difference I can spot is in yesterday's project, the File's 
Owner is an NSDocument. Today, it's a PrefsPane.

Is it possible to use this stuff in a prefs pane? What am I missing?

Thanks!

--
Rick

Related mailsAuthorDate
mlCore Data & IB in prefs pane ("Cannot perform operation without a managed object context") Rick Mann Mar 28, 21:18
mlDuplicating NSPersistentDocument Core Data support (was: Core Data & IB in prefs pane ("Cannot perform operation without a managed object context")) Rick Mann Mar 28, 21:43
mlRe: Core Data & IB in prefs pane ("Cannot perform operation without a managed object context") Keary Suska Mar 30, 00:17