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 (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 arch...@mail-archive.com

Reply via email to