Re: Protocol implementation split between base and derived class
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