Re: KVO on objects in NSArrayController
Re: KVO on objects in NSArrayController
- Subject: Re: KVO on objects in NSArrayController
- From: Jerry Krinock <email@hidden>
- Date: Sat, 03 Sep 2011 07:52:27 -0700
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