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.
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'
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'