Core data, bindings and multiple view NIBs
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