Re: respondsToSelector - #import OR compiler warnings?
Re: respondsToSelector - #import OR compiler warnings?
- Subject: Re: respondsToSelector - #import OR compiler warnings?
- From: mmalc crawford <email@hidden>
- Date: Tue, 30 Dec 2008 15:51:23 -0800
I hope Bill will forgive me adding another option.
With this pattern, it's also common for your protocol to adopt another
protocol, such as NSObject:
@MyProtocol <NSObject>
@optional
- (void)myMethod;
@end
This way you can test your delegate using respondsToSelector: without
the compiler complaining.
mmalc
On Dec 30, 2008, at 3:12 PM, Bill Bumgarner <email@hidden> wrote:
(2) The _delegate will *only* respond to methods declared in
BobDelegate (the compiler will warn for any others, even -
description and other NSObject methods). This is exactly correct.
_______________________________________________
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