On Nov 26, 2010, at 6:22 PM, Dave Zwerdling wrote:

> You can implement other methods and do a single cast to NSObject 
> <nameOfProtocol>* (or id<nameOfProtocol> if you don't need the NSObject 
> methods)


It is often impossible to get away from needing at least some of NSObject's 
functionality, but fortunately you can declare that your protocol inherits from 
another, and there is also an NSObject protocol that defines the core 
functionality of the class, so you can do this when you declare your protocol 
and never need to worry about "NSObject<someProtocol>"

@protocol SomeProtocol : NSObject
// stuff
@end
--
David Duncan

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to