Re: Notification Vs Delegation
Re: Notification Vs Delegation
- Subject: Re: Notification Vs Delegation
- From: Peter Ammon <email@hidden>
- Date: Fri, 31 Oct 2008 17:59:21 -0700
On Oct 31, 2008, at 5:33 PM, John Joyce wrote:
This may be a pointless and silly question, but
is Delegation faster than Notification (generally) ?
Delegation allows you to check if the client is interested, via
respondsToSelector:. If the delegate does not implement the method
(or there is no delegate), then you may be able to save some work.
There's no equivalent way to tell if any object is listening for a
notification.
Though sometimes whether the object notifies is controllable, as in
[NSView setPostsFrameChangedNotification:]
-Peter
_______________________________________________
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