Re: Implementing delegates with formal protocols
Re: Implementing delegates with formal protocols
- Subject: Re: Implementing delegates with formal protocols
- From: Rick Mann <email@hidden>
- Date: Fri, 28 Aug 2009 15:06:33 -0700
On Aug 28, 2009, at 15:02:13, Corbin Dunn wrote:
On Aug 28, 2009, at 2:57 PM, Rick Mann wrote:
Thanks for the suggestions. I have one suggestion saying to extend
my protocol to conform to NSObject, and another saying I should use
NSObject instead of ID.
Is one approach better than the other?
Yes; David's suggestion is preferred. It is what we did in AppKit
for SnowLeopard, ie:
@protocol NSControlTextEditingDelegate <NSObject>
The main reason is so controls can store a reference and do a -
respondsToSelector: on @optional methods.
Thanks much!
_______________________________________________
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