Re: protocol not seeing superclass implementation : bug or feature?
Re: protocol not seeing superclass implementation : bug or feature?
- Subject: Re: protocol not seeing superclass implementation : bug or feature?
- From: Marcel Weiher <email@hidden>
- Date: Wed, 27 Mar 2002 13:36:26 +0100
Of course, this workaround also completely defeats protocols as a
type-checking mechanism, because it lets you declare the class as
conforming without actually implementing anything.
I think it was at this very point that I gave up on the whole protocol
thing a couple of years ago.
Marcel
On Wednesday, March 27, 2002, at 12:28 PM, Nathan Day wrote:
Protocols don't work like this unfortunately but you can get a similar
effect by implementing the formal protocol as part of an informal
protocol, that is a category of the class with no implementation block.
for example
#import <AppKit/AppKit.h>
@protocol MyRectangle
- (NSRect)bounds;
@end
@interface TestView : NSView {
}
@end
@interface TestView (MyRectangle) <MyRectangle>
@ end
--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.