• 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
Core data, bindings and multiple view NIBs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core data, bindings and multiple view NIBs


  • Subject: Core data, bindings and multiple view NIBs
  • From: Tomaž Kragelj <email@hidden>
  • Date: Tue, 26 May 2009 13:21:42 +0200

Hi all

I'm (again) banging my head with a single window, multiple views app using core data. Each of my view is implemented within it's own NIB and handled by a NSViewController subclass. The views share the same data from the same MOC. Using the following core data model I cannot bind the data as I want:

Group <--->> Item

My intention is to show the list of items that belong to selected group. To do that, I add two NSArrayControllers to MainMenu.nib and setup their bindings, then expose the controllers through IBOutlet to my app delegate. This works as expected. Then I use a separate NIB with the view which handles the list of all groups. It also contains it's own NSArrayController instance (dragged from the palette) which is bound to the "master" controller from the app delegate. This works, it even supports binding the selection. However I'm not able to do the same for the items view (again in it's own NIB, handled by it's own NSViewController subclass) - the closest solution I came to was that ALL items for ALL groups were shown, however adding new ones (saving actually) failed since their group relation was not set...

I'm sure I'm missing something, can someone point me to a proper direction?
Thanks, Tom
_______________________________________________


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: Core data, bindings and multiple view NIBs
      • From: Keary Suska <email@hidden>
  • Prev by Date: RE: How to use CFReadStrem and abort read stream normally?
  • Next by Date: How to check whether a application is launch or not...?
  • Previous by thread: Re: String Comparison and return values
  • Next by thread: Re: Core data, bindings and multiple view NIBs
  • Index(es):
    • Date
    • Thread