• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: KVO on objects in NSArrayController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: KVO on objects in NSArrayController (From: Trygve Inda <email@hidden>)
 >Re: KVO on objects in NSArrayController (From: Dave Fernandes <email@hidden>)
 >Re: KVO on objects in NSArrayController (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: KVO on objects in NSArrayController
  • Next by Date: Re: KVO on objects in NSArrayController
  • Previous by thread: Re: KVO on objects in NSArrayController
  • Next by thread: Best Practices for Associating a File Extension With a File in XCode 4?
  • Index(es):
    • Date
    • Thread