0

I am now trying to build a web browser from the tutorial at macdevcenter.com: http://macdevcenter.com/pub/a/mac/2004/05/28/webkit.html?page=3

And I am on the MyDocument.h file part on page 3 that teaches how to set a default homepage. It says that I have to add these prototypes for some accessors used later on in the .m file:

(void)setDefaultHomepage:(NSString*); // the error says expected "(" before "void"
-(NSString *)getDefaultHomepage;

Can anyone tell me what this means and what I should do about it?

--Thank you!

4

2 回答 2

5

You need to add a - in front of (void), you may want to put a variable name after as well

-(void) setDefaultHomepage: (NSString*) newhomepage;
于 2010-12-11T05:31:53.213 回答
2

I think you need a - in there:

-(void)setDefaultHomepage:(NSString*);
于 2010-12-11T05:29:34.020 回答