Re: how to get a managedObjectContext in a nib file
Re: how to get a managedObjectContext in a nib file
- Subject: Re: how to get a managedObjectContext in a nib file
- From: Michael Thon <email@hidden>
- Date: Wed, 2 Sep 2009 16:37:16 +0200
On Sep 2, 2009, at 4:16 PM, Sean Kline wrote:
To what entity is your Array Controller bound? (just checking to see
if you did this...forgive the question if it is too basic)
I finally got it working. Instead of having the window controller set
its own managedObjectContext in awakeFromNib, I passed it one right
after I call init, but before awakeFromNib is called:
TNSManageCollectionsWindowController *m =
[[TNSManageCollectionsWindowController alloc] init];
NSManagedObjectContext *moc = [[[NSApplication sharedApplication]
delegate] managedObjectContext];
[m setManagedObjectContext:moc];
if (![NSBundle loadNibNamed:@"ManageCollectionsWindow" owner:m]) {
NSLog(@"error loading the ManageCollectionsWindow nib");
}
_______________________________________________
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