I'm having some trouble managing and editing Core Data entities within a
single context across multiple nibs.

In my main document nib, I have an NSTreeController with it's content
binding set to an NSMutableArray within the document class. I can bind an
outline view to this, and some other fields and it all works great. The
controller uses the following path for the Managed Object Context (rather
than using Files Owner directly so I can use the same path everywhere)

NSApplication.mainWindow.document.managedObjectContext

and the content array is

NSApplication.mainWindow.document.shapes

Now I have an inspector panel in a seperate nib with an identical
NSTreeController with identical paths set, and some fields bound to the
attributes of the current 'selection'. If I a add an entity to the main
window, the fields in the inspector sometimes update, and sometimes don't.
There's doesn't seem to be any patten to it. Changing the selection has no
effect and there are no relevent messages in the console.

I used to handle all this in code with notifications but I would like to get
it working with CoreData bindings. Unless I'm mistaken, there is only one
per-document context being shared here and both controllers point at the
same thing. So if I alter the context with one, that change should
immediately be apparent in the others, no? This all works great in a
single-nib app.

Any help appreciated.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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