• 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: Notification Vs Delegation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Notification Vs Delegation (From: John Joyce <email@hidden>)

  • Prev by Date: [OT] Install Issues
  • Next by Date: Re: Can NSURLConnection use Proxy Server?
  • Previous by thread: Re: Notification Vs Delegation
  • Next by thread: [OT] Install Issues
  • Index(es):
    • Date
    • Thread