Re: Core Data App With Auxiliary Panel
Re: Core Data App With Auxiliary Panel
- Subject: Re: Core Data App With Auxiliary Panel
- From: Richard Somers <email@hidden>
- Date: Sat, 1 Aug 2009 08:03:52 -0600
On Aug 1, 2009, at 12:28 AM, Quincey Morris wrote:
You haven't said what you mean by an "auxiliary panel".
It is an inspector panel. One panel for many documents. The panel is
made visible with a menu selection which by the way currently works.
Or, in all 3 cases, just pass the managed object context to the
AuxPanelController initializer, and stash it in your otherwise
unused instance variable.
The managed object context is returned by the following method in my
window controller for the panel.
- (NSManagedObjectContext *)managedObjectContext
{
return [[self document] managedObjectContext];
}
The managed object context ivar was probably misleading everyone.
Setting this ivar in the window controller initializer will not work
because I have one panel for many documents. As suggested previously I
have dumped the ivar. The -managedObjectContext method should return
on demand the correct context. It is this method that I am trying to
bind the array controller to.
If I create the inspector panel in the document nib and bind the array
controller to the File's Owner everything works great. It is when I
try to create an inspector panel in a separate nib that something goes
wrong. The error message "Cannot perform operation without a managed
object context" indicates the binding is not working. I think this is
my problem. How do you debug a binding?
Richard
_______________________________________________
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