views:

98

answers:

4

Hi there,

I'm currently developing an iPhone application, and when it comes to compiling, I have the aforementioned error. Here's the block of code it's on:

-(void)tableView(UITableView *)tableView{
didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    NextViewController *nextController = [[NextViewController alloc]
                                          initWithNibName::@"NextView" bundle:nil];
    [self.navigationController pushViewController:nextController
                                         animated:YES];
    [nextController changeItemTable:[arryClientSide
                                     objectAtIndex:indexPath.row]];
}

And the very first line in that block of code is where the error is. If you would like more code, please do ask.

Regards,
Jack

A: 
-(void)tableView(UITableView *)tableView{

You need a : before parameter like this:

-(void)tableView:(UITableView *)tableView{

// edit: without the "{" at the end

gammelgul
you missed the stray { on the end of that line. It doesn't need to be there, it's in the middle of a method signature.
Jasarien
Urg, didn't look at the second line carefully enough :>
gammelgul
+6  A: 

First line:

-(void)tableView(UITableView *)tableView{

should be

-(void)tableView:(UITableView *)tableView
Vladimir
+1  A: 

your missing a colon, as per docs:

  • (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
Mick Walker
Vladimir's answer is also perfectly valid.
Mick Walker
A: 

You should also include the line at the end of your method

[nextController release];
adam