Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notification Vs Delegation




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.