iPhone Application crashing upon loading a new Detail View

Posted by Jeb Sears on Stack Overflow See other posts from Stack Overflow or by Jeb Sears
Published on 2010-04-21T22:42:38Z Indexed on 2010/04/21 22:53 UTC
Read the original article Hit count: 186

Filed under:
|
|

Hi, My problem is when trying to load a detail view through a table cell, the application constantly crashes. The error that comes up when running through debug is "__TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___" objc exception thrown. If anyone can help me it would be greatly appreciated.

Here is a screenshot for the debug, I am not sure if I am interpreting it right http://img43.imageshack.us/img43/2143/errorud.png

Here is my code where I beleive the error is happening:

- (void)tableView:(UITableView *)tableView  didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSInteger row = [indexPath row];
if(self.moreDetailView == nil){
    DetailViewController *dvController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:[NSBundle mainBundle]];
    self.moreDetailView = dvController;
    [dvController release];
}
else{}
moreDetailView.title = [NSString stringWithFormat:@"%@", [listOfItems objectAtIndex:row]];

goHerdv2AppDelegate *delegate = [[UIApplication sharedApplication] delegate];
[delegate.detailView pushViewController:moreDetailView animated:YES];}

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk