Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

stephanos180

macrumors member
Original poster
Hi, everyone. I'm new to developing and am just trying to figure out how to delete rows. Can someone please help me figure out what's going on? The last line is causing the error... Thanks.

Code:
 - (void)tableView:(UITableView *)tv commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {

    if (editingStyle == UITableViewCellEditingStyleDelete) {
		Timer_ProAppDelegate *appDelegate = (Timer_ProAppDelegate*)[[UIApplication sharedApplication] delegate];
		[appDelegate.playlists removeObjectAtIndex:indexPath.row];
		[self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
	}
	
}

Here's the console output.

2010-12-16 16:50:13.596 Timer Pro[44881:207] *** -[NSIndexPath count]: unrecognized selector sent to instance 0x39268c0
2010-12-16 16:50:13.598 Timer Pro[44881:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSIndexPath count]: unrecognized selector sent to instance 0x39268c0'
 
What is self.tableView when the error occurs? Often, "unrecognized selector" indicates an over-released object.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.