Core Data App With Auxiliary Panel
Core Data App With Auxiliary Panel
- Subject: Core Data App With Auxiliary Panel
- From: Richard Somers <email@hidden>
- Date: Fri, 31 Jul 2009 21:03:34 -0600
I am having problems binding an auxiliary panel with the document's
managed object context. The panel is in nib separate from the document
nib. My code looks like this.
@interface AuxPanelController : NSWindowController
{
@private
NSManagedObjectContext *managedObjectContext;
}
@implementation AuxPanelController
- (id)init
{
if (![super initWithWindowNibName:@"AuxPanel"])
return nil;
return self;
}
- (NSManagedObjectContext *)managedObjectContext
{
return [[self document] managedObjectContext];
}
In the AuxPanel.xib the array controller's managed object context is
bound to the File's Owner managedObjectContext model key path. The
File's Owner object is the AuxPanelController.
In the running application the auxiliary panel displays properly but
an error message is produced: "Cannot perform operation without a
managed object context".
Any suggestions?
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