Re: Binding to an NSMutableArray
Re: Binding to an NSMutableArray
- Subject: Re: Binding to an NSMutableArray
- From: "Stephen J. Butler" <email@hidden>
- Date: Wed, 16 Feb 2011 00:05:43 -0600
On Tue, Feb 15, 2011 at 11:08 PM, Lorenzo Thurman <email@hidden> wrote:
> I should add that there are 2 tables side by side in the app. On the left, 3 columns, fname, lname bound directly to Student object as controller.fname/lname and the count of infractions in the third column using infractions.@count
> On the right, when a student from the left is highlighted, I want to display the infraction name and description for each infraction in the array. So, if it were possible, I would expect the keypath to look something like this:
> email@hiddenctionName/description
> But clearly that can't be done.
You need two NSArrayControllers: StudentController and
InfractionController. Then these bindings:
- InfractionController: content array bound to StudentController ->
selection -> infractions
- Left table view: StudentController -> arrangedObjects
- Right table view: InfractionController -> arrangedObjects
It works, I just wrote up an example. But unfortunately my
universities file storage is crapping out and I can't share it at the
moment.
_______________________________________________
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