Re: Using NSArrayController with a complex, heterogeneous model
Re: Using NSArrayController with a complex, heterogeneous model
- Subject: Re: Using NSArrayController with a complex, heterogeneous model
- From: Rick Mann <email@hidden>
- Date: Fri, 16 Jan 2015 21:35:57 -0800
> On Jan 16, 2015, at 21:20 , Jerry Krinock <email@hidden> wrote:
>
>
>> On 2015 Jan 16, at 20:58, Rick Mann <email@hidden> wrote:
>>
>> A "Part" in my app has a set of geometric primitives, and a set of labels (both have a common base class). These are two separate sets (arrays) on the part. But when editing the part, they can each be clicked on and edited. I want to use an NSArrayController to manage the selection
>
> Consider a more standard approach: Two array controllers, one for each collection. I sense you don’t want to do that because you want only one item to be “selected”. That seems like an unnecessary restriction. You can have a set of geometric primitives, with a selection, and a separate set of labels, with a selection. True, the user can only edit one of these at a time, but the other selection doesn’t mind sitting idly by.
The problem I see with two controllers has to do with managing the selection, and numerous other problems. For example, I have an inspector that's looking at the "current selection." How does it consider the unified selection of both controllers? More than one controller seems to be asking for trouble.
--
Rick Mann
email@hidden
_______________________________________________
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