• 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
Problems extending NSPersistentDocument Core Data Tutorial
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems extending NSPersistentDocument Core Data Tutorial


  • Subject: Problems extending NSPersistentDocument Core Data Tutorial
  • From: Simon <email@hidden>
  • Date: Sun, 18 Nov 2007 21:42:30 +0100

Hi

I want to extend the core-data application from the NSPersistentDocument core data tutorial with some additional functionality. I've added a sheet to manage a tree of departements. The Department entity has two additional relationships, a parent and an inverse children relationship. I've successfully managed to bind an NSTreeController and an NSOutlineView. Now, I want to add an NSPopupButton to the new object sheet which allows to choose the department for a new employee.

However, if I launch the application and add some departments and then try to add a new employee, the NSPopupButton is not updated (that is, it stays empty). If I save the document, reopen it and add a new employee, the popup button is properly populated. Below the changes I've made in the new Employee Sheet NIB.

* NSArrayController for the departements
** managedObjectContext bound to managedObjectContext of File's Owner
* NSPopupButton for the departements
** Content bound to array controller arrangedObjects
** Content Values bound to array controller arrangedObjects key path name
** Selected Object bound to Object Controller arrangedObjects key path department


If I bind the array controller's managedObjectContext to the documentManagedObjectContext of File's Owner, the popup menu is populated (I can't complete the sheet because the department is from a different managed object context and that is obviously not allowed). How can I make sure that the changes from the departments sheet are visible in the new object sheet's popup button?

Thanks
Simon

_______________________________________________

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


  • Follow-Ups:
    • Re: Problems extending NSPersistentDocument Core Data Tutorial
      • From: Simon <email@hidden>
  • Prev by Date: Re: Accessing C++ class method from ObjC++ code
  • Next by Date: Distributed Objects & Leopard
  • Previous by thread: Re: Split Colorwell
  • Next by thread: Re: Problems extending NSPersistentDocument Core Data Tutorial
  • Index(es):
    • Date
    • Thread