I came up with a solution very similar to what others have done. It basically seems to work:
-(void)deleteTask:(id)sender
{
int rowISelected = [self.taskTable selectedRow];
[self.tasks removeObject:self.tasks[rowISelected]];
[self.taskTable reloadData];
[self updateChangeCount:NSChangeDone];
}
There’s one issue, though. It will delete items with the same name, even if only one is selected. So if bread, milk, juice, bread are in my list and I delete the first instance of bread, both will be deleted.
My best guess was that somehow they were both being classified as the same row, but I haven’t found anything in the documentation to support this.
Does anyone know?