• 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: Protocol implementation split between base and derived class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Protocol implementation split between base and derived class


  • Subject: Re: Protocol implementation split between base and derived class
  • From: Marcel Weiher <email@hidden>
  • Date: Fri, 10 Dec 2004 23:48:53 +0000

On 8 Dec 2004, at 22:35, Scott Hancher wrote:



I've defined a protocol. I have several classes that need to implement this protocol. A subset of the protocol methods have general implementations that can be implemented in a common super class. However, XCode doesn't appear to accept the super class's implementation in determining whether each derived class implements the entire protocol.

I can get around this by adding an implementation of each of the super class methods in each subclass and calling the corresponding super method. This step doesn't seem like it should be necessary though.

Is there any other way around this? Is this a bug in XCode?
Gcc. RTFM: -Wno-protocol
If a class is declared to implement a protocol, a warning is issued forevery method in the protocol that is not implemented by the class. Thedefault behavior is to issue a warning for every method not explicitlyimplemented in the class, even if a method implementation is inheritedfrom the superclass. If you use the -Wno-protocol option, thenmethods inherited from the superclass are considered to be implemented,and no warning is issued for them.




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Protocol implementation split between base and derived class (From: Scott Hancher <email@hidden>)

  • Prev by Date: Re: Kill other process's warning dialog
  • Next by Date: Re: Retain/release question
  • Previous by thread: Re: Protocol implementation split between base and derived class
  • Next by thread: NSTask launch of suid helper tool will not terminate...
  • Index(es):
    • Date
    • Thread