• 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: Design Question: Pro & Cons of KVC/KVO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Design Question: Pro & Cons of KVC/KVO


  • Subject: Re: Design Question: Pro & Cons of KVC/KVO
  • From: Graham Cox <email@hidden>
  • Date: Fri, 22 Aug 2008 14:52:20 +1000


On 22 Aug 2008, at 2:22 pm, Phil wrote:

Why use NSNotifications when there's already
perfectly good notification mechanism?


Indeed, but notifications have been around a lot longer than KVO, so there are still plenty of places in Cocoa that notifications are used for legacy reasons.

Also, as others have mentioned, they are better when you have more than one object that you might have an interested in. With KVO you have to subscribe to each individually, with notifications you can subscribe to the same notification from any object that might send it.

Horses for courses, as usual.

My point was that notifications are a messaging mechanism; KVO or rolling your own aren't the only games in town. So notifications should be considered when thinking about messaging. If subsequently rejected for a given design, so be it.

cheers, Graham
_______________________________________________

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: 
 >Design Question: Pro & Cons of KVC/KVO (From: "Oleg Krupnov" <email@hidden>)
 >Re: Design Question: Pro & Cons of KVC/KVO (From: Negm-Awad Amin <email@hidden>)
 >Re: Design Question: Pro & Cons of KVC/KVO (From: "Oleg Krupnov" <email@hidden>)
 >Re: Design Question: Pro & Cons of KVC/KVO (From: Negm-Awad Amin <email@hidden>)
 >Re: Design Question: Pro & Cons of KVC/KVO (From: "Oleg Krupnov" <email@hidden>)
 >Re: Design Question: Pro & Cons of KVC/KVO (From: Negm-Awad Amin <email@hidden>)
 >Re: Design Question: Pro & Cons of KVC/KVO (From: "Oleg Krupnov" <email@hidden>)
 >Re: Design Question: Pro & Cons of KVC/KVO (From: Graham Cox <email@hidden>)
 >Re: Design Question: Pro & Cons of KVC/KVO (From: "Kyle Sluder" <email@hidden>)
 >Re: Design Question: Pro & Cons of KVC/KVO (From: Phil <email@hidden>)

  • Prev by Date: Re: add dummy NSView subclass to framework?
  • Next by Date: Re: add dummy NSView subclass to framework?
  • Previous by thread: Re: Design Question: Pro & Cons of KVC/KVO
  • Next by thread: Re: Design Question: Pro & Cons of KVC/KVO
  • Index(es):
    • Date
    • Thread