Re: KVO on objects in NSArrayController
Re: KVO on objects in NSArrayController
- Subject: Re: KVO on objects in NSArrayController
- From: Dave Fernandes <email@hidden>
- Date: Sat, 03 Sep 2011 11:03:14 -0400
I agree, it is certainly a valid and useful design pattern that I use as well. But I just wasn't sure that it is needed in the OP's case. From the part that I read (and I missed the first part of the thread), there was no mention of which objects needed to be notified.
On 2011-09-03, at 10:52 AM, Jerry Krinock wrote:
>
> On 2011 Sep 03, at 07:34, Dave Fernandes wrote:
>
>> I'm coming late to this conversation, but couldn't you just add a -[MyObject setMarked:] method that would then be called to change the 'marked' attribute/property? It can do anything else it wants after making the change. Why use notifications at all? Is it some other object that needs to be notified when MyObject changes?
>
> Yes. The reason I use the notification is, of course, the same reason you always using a notification, because the observer is not known to the observee, and/or it makes for nicer encapsulation. But if you didn't have these reasons, indeed a simple message would work.
>
> _______________________________________________
>
> 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
_______________________________________________
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