• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to get a managedObjectContext in a nib file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >how to get a managedObjectContext in a nib file (From: Michael Thon <email@hidden>)
 >Re: how to get a managedObjectContext in a nib file (From: Sean Kline <email@hidden>)

  • Prev by Date: My NSUndoManager subclass is broken on SL - how to fix?
  • Next by Date: Need a launch/loading screen to be displayed while app is starting/initializing?
  • Previous by thread: Re: how to get a managedObjectContext in a nib file
  • Next by thread: Finder contextual menu plugin 10.6
  • Index(es):
    • Date
    • Thread