protocol not seeing superclass implementation : bug or feature?
protocol not seeing superclass implementation : bug or feature?
- Subject: protocol not seeing superclass implementation : bug or feature?
- From: "Michael B. Johnson" <email@hidden>
- Date: Tue, 26 Mar 2002 23:56:52 -0800
So let's say I have the following code in my TestView.h:
#import <AppKit/AppKit.h>
@protocol MyRectangle
- (NSRect)bounds;
@end
@interface TestView : NSView <MyRectangle> {
}
@end
When I compile, I get:
TestView.m:26: warning: incomplete implementation of class `TestView'
TestView.m:26: warning: method definition for `-bounds' not found
TestView.m:26: warning: class `TestView' does not fully implement the
`MyRectangle' protocol
which, given that NSView *does* implement this method, and TestView
clearly inherits from NSView, it seems silly for the compiler to
complain. Is this somehow a feature, and I'm missing it? Or is this a
genuine bug? If it's not a bug, what's the best way to not get the
error - I can obviously declare and then implement
- (NSRect)bounds {
return [super bounds];
}
but that seems silly (or again, maybe not - I think I'm just not seeing
some obvious feature of this).
Thanks for any insight.
--> Michael B. Johnson, Ph.D. -- email@hidden
--> Studio Tools, Pixar Animation Studios
-->
http://xenia.media.mit.edu/~wave
_______________________________________________
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.