\n@protocol PFoo\n- garble;\n@end\n\n@interface Yodel : NSObject <PFoo>\n@end\n\nThen in some code somewhere:\nid <PFoo> mFoo = [myYodel retain];\n
Compile it, and you get "warning: method `retain' not implemented by protocol".
Change it so it says:
\n@protocol PFoo\n- garble;\n- retain;\n@end\n\n@interface Yodel : NSObject <PFoo>\n@end\n
SomeCode.m:20: warning: incomplete implementation of class `Yodel'
SomeCode.m:20: warning: method definition for `-retain' not found
SomeCode.m:20: warning: class `Yodel' does not fully implement the `PFoo' protocol
Even though NSObject has a retain method... I had to put - retain { return [super retain]; } to get the warning to go away...
What's the usual way to proceed in this sort of situation?