Re: [Q] Do subclasses implementing same Protocol as super class also need to include it in declaration?
Re: [Q] Do subclasses implementing same Protocol as super class also need to include it in declaration?
- Subject: Re: [Q] Do subclasses implementing same Protocol as super class also need to include it in declaration?
- From: Rick Mann <email@hidden>
- Date: Wed, 16 Jul 2008 14:17:42 -0700
On Jul 16, 2008, at 14:15:45, Rick Mann wrote:
I have a class D that derives from class S. S derives from
NSObject<NSCoding>. Do I need to declare D as:
@interface D : S<NSCoding>
or can I leave off the <NSCoding> for the derived classes, and still
get appropriate warnings?
I think I answered my own question: you *should* specify the Protocol
at all levels of the inheritance graph where you want the Protocol
enforced.
--
Rick
_______________________________________________
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