Re: KVO on objects in NSArrayController
Re: KVO on objects in NSArrayController
- Subject: Re: KVO on objects in NSArrayController
- From: Trygve Inda <email@hidden>
- Date: Sat, 03 Sep 2011 00:12:15 -0700
- Thread-topic: KVO on objects in NSArrayController
>
> On 2011 Sep 02, at 22:22, Trygve Inda wrote:
>
>>> Briefly, you can configure the checkbox cell (either in IB or
>>> programmatically) to have an action…
>
>> I think this sounds like a much better option than trying to use KVO.
>
> Indeed it is, *if* you literally want the notification, as you said in your
> original post, "whenever the user toggles a … checkbox".
>
> However, if, as is more commonly the case, you actually need a notification
> whenever the 'marked' attribute in the data model changes, and if your
> application provides any other means by which that attribute could be changed,
> such as Undo, scriptability, business logic, or some other view of that
> attribute, which may be added in the future, then the shortcut of wiring to
> the control's action, although convenient, is going to be be missing these
> changes.
I understand that... I think the alternative would be to register an
observer on all 8000+ objects in the array.
For now however, the checkbox is the only way to alter the marked state so
this should work.
Thanks!
_______________________________________________
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