Sharing a Bindings Controller between nibs
Sharing a Bindings Controller between nibs
- Subject: Sharing a Bindings Controller between nibs
- From: Citizen <email@hidden>
- Date: Tue, 14 Oct 2008 23:30:50 +0100
Hi,
I'm just getting to grips with bindings.
I have a master-detail interface, where the Detail interface is in a
separate nib from the main Master interface (so that different Detail
interfaces can be swapped in).
The main Master interface nib contains an NSTreeController which is
used to display an iTunes like source list.
The Detail interface needs to access the current selection presented
by the NSTreeController, but the tree controller is in another nib.
So, what is the cleanest way (i.e with the least glue code) of
connecting the two?
My current plan is to connect the NSTreeController to an outlet (named
sourceTree) in the MasterViewController. Then make the
MasterViewController a delegate of the DetailViewController. And then
access the selected content using a key path something like
@"delegate.sourceTree.selection".
But I can't help feeling that there must be a better way of doing
this? Any suggestions?
Thanks,
Dave
------
David Kennedy (http://www.zenopolis.com)
_______________________________________________
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