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 home开发者_高级运维page. 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!
You need to add a - in front of (void), you may want to put a variable name after as well
-(void) setDefaultHomepage: (NSString*) newhomepage;
I think you need a -
in there:
-(void)setDefaultHomepage:(NSString*);
精彩评论