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 (Cocoa-dev@lists.apple.com)
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/dave.fernandes%40utoronto.ca
> 
> This email sent to dave.fernan...@utoronto.ca

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to