Re: Docs, questions and stuff
Re: Docs, questions and stuff
- Subject: Re: Docs, questions and stuff
- From: Jonathan Hendry <email@hidden>
- Date: Fri, 24 Aug 2001 18:25:57 -0500
On Friday, August 24, 2001, at 06:05 , Stuppel, Searle @ San Diego
Central wrote:
I thought that in VERY RARE instances some classes in cocoa can inherit
from
two superclasses. Not sure on this though. I just remember reading
something
to this effect.
Nope. Perhaps you saw a Protocol-using Class declaration?
@interface Foo:NSObject <SomeProtocol>
{
}
@end
The <SomeProtocol> is analogous to Java's 'implements SomeInterface'
it's like a contract that Foo implements all the methods declared
in SomeProtocol. Foo has to provide the actual implementations,
so it doesn't inherit anything. If Foo doesn't provide the
implementations
for the methods, it won't compile.