Compiler internal error: bus error

I am trying to make a UITableView with a view with detailed information, but getting two errors. After the following code, I received the same errors twice: 'Internal compiler error: bus error' and I have no idea why? Can anybody help me? You can find the code image under here .

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger row = [indexPath row]; if (self.verwaltungDetailViewController == nil){ verwaltungDetailViewController *aVerwaltungDetail = [[verwaltungDetailViewController alloc] initWithNibName:@"VerwaltungDetailView" bundle:nil]; self.verwaltungDetailViewController = aVerwaltungDetail; [aVerwaltungDetail release]; } verwaltungDetailViewController.title = [NSString stringWithFormat:@"%@", [verwaltungsArray objectAtIndex:row]]; NatersAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; [delegate.VerwaltungNavController pushViewController:verwaltungDetailViewController animated:YES]; 

}

Thank you for your help!

+1
source share
1 answer

It seems to me that you have a class called VerwaltungDetailViewController (note the uppercase "V"), and you mix it with the instance variable and the VerwaltungDetailViewController property (note the lowercase "v"). In the first line of the if block, you are trying to instantiate the latter, when you should try to instantiate the first. Your code should look something like this:

 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger row = [indexPath row]; if (self.verwaltungDetailViewController == nil){ VerwaltungDetailViewController *aVerwaltungDetail = [[verwaltungDetailViewController alloc] initWithNibName:@"VerwaltungDetailView" bundle:nil]; self.verwaltungDetailViewController = aVerwaltungDetail; [aVerwaltungDetail release]; } verwaltungDetailViewController.title = [NSString stringWithFormat:@"%@", [verwaltungsArray objectAtIndex:row]]; NatersAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; [delegate.verwaltungNavController pushViewController:verwaltungDetailViewController animated:YES]; 

Edit: You also make a mistake in the last line of code, except to the contrary.

+1
source

All Articles