If you set an NSTableView’s double action in Tiger or earlier by something like:
[tasksTable setTarget:self]; [myTable setDoubleAction:@selector(doDoubleClick:)];
doDoubleClick would only get fired for clicks on blank cells, headers, or uneditable cells. The documentation still reflects this. In Leopard, this is no longer the case: doDoubleClick gets called no matter what. If you want the old behavoir – that is, if you want the cells to receive the edit action, you must do it manually. Clickedrow is -1 for headers and empty cells. Thus, the code would look something like:
- (IBAction)doDoubleClick:(id)sender {
if([sender clickedRow] == -1){
//your special action goes here
}
else {
[myTable editColumn:[sender clickedColumn]
row:[sender clickedRow]
withEvent:nil select:YES];
}
}
Hope this helps somebody scratching their head with the same issue!
July 2, 2008 at 9:33 pm
Thanks!
September 30, 2008 at 6:22 am
thanks for that hint, yesterday i give up on that doDoubleAction…