• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Q] Do subclasses implementing same Protocol as super class also need to include it in declaration?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >[Q] Do subclasses implementing same Protocol as super class also need to include it in declaration? (From: Rick Mann <email@hidden>)

  • Prev by Date: MobileMe upload file to iDisk
  • Next by Date: Re: Memory Allocation
  • Previous by thread: [Q] Do subclasses implementing same Protocol as super class also need to include it in declaration?
  • Next by thread: Re: [Q] Do subclasses implementing same Protocol as super class also need to include it in declaration?
  • Index(es):
    • Date
    • Thread