Method Decleration causing weird error?!
Hi Guys,
I haven't opened up the SDK in ages, since I got the 3.0 one which was like two days after.
I went to write this code:
-(IBAction)buttonClicked;
in my ViewController.h file (new project)
I did all my outlets and everything and implemented the method, all of it builds fine apart from I get two errors generically in that file, i.e no specific line is highlighted but if I import that file it gives an error on the import line, but if I open up the build details window (that's what I call it!) and click on the error line in the upper pane. It half hilights the line of code. When I delete it it builds fine.
The error reads: /iTestViewController.h:18: error: expected specifier-qualifier-list before '-' token
This has never happened to me before 3.0 and is really confusing. I may have got some code order (placing) wrong cos I haven't coded for ages so here it is.
viewcontroller.h
@interface iTestViewController : UIViewController {
IBOutlet UIButton *clickButton;
IBOutlet UILabel *display;
-(IBAction)buttonClicked;
}
@end
Please help!
Alex
|