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 (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 [EMAIL PROTECTED]

Reply via email to