Re: what do I need the NSArrayController for?
Re: what do I need the NSArrayController for?
- Subject: Re: what do I need the NSArrayController for?
- From: Seth Willits <email@hidden>
- Date: Thu, 03 Apr 2014 10:18:20 -0700
On Apr 3, 2014, at 3:29 AM, Roland King <email@hidden> wrote:
> So where I ended up is understanding my model, which conflated available devices and selected device was flawed thus meaning I can't have two views each with a different selected device.
I meant to make that point too. In their example it makes sense for a game character to have a list of available weapons and a selected weapon, but in your case, the same object having both properties may not.
> The only odd extra I've had to write is a small class which binds to the Array Controller (to get the arrangedObjects and the selectedIndexes, of which there is only ever 1...
Since that class only wants to be notified, not influence the selection, KVO is better idea than a binding IMO. (There are those who will say both are war crimes, but that's besides the point.) Use bindings only if you want the both ends to be able to change the value.
--
Seth Willits
_______________________________________________
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