Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Method Definition Not Found... automatic stub with Xcode?

I don't want to give up before asking, because this is basic functionality in any Java/.Net IDE. The compiler tells me:

Incomplete implementation of class...
Method definition for '-someMethod:' not found

but clicking, right-clicking, praying and Google searching have not gotten me to automatically create a method stub from this. Can Xcode create a method stub for me and take me there?

If not, why might that be (aside from "real programmers enjoy typing")?

Edit: I thought that option-escape basically solved this for me, but it does not. It doesn't seem to be aware of all (any?) of the interfaces my class implements.

like image 594
Dan Rosenstark Avatar asked Mar 03 '10 10:03

Dan Rosenstark


1 Answers

This might be an option to file a feature request to Apple. Typically, I will design my @interface file and then do a copy/paste of the @interface to the @implementation keeping typing to an absolute minimum.

However, it would be nice to be able to click on the warning and have Xcode simply create the method at the botto of the @implementation.

NOTE: it is valid to keep the semicolon after the @implementation

@interface PCStackValue : NSObject <NSCoding, NSCopying>
{
}

- (id) initWithDisplayRadix:(int) newRadix;

@end

@implementation PCStackValue

- (id) initWithDisplayRadix:(int) newRadix;
{
   … do something;
}
@end    
like image 187
Steven Noyes Avatar answered Oct 06 '22 00:10

Steven Noyes