It sounds like you're trying to make a spreadsheet. That's not what a table view is.
A table view is a list of items, one per row, showing one or more aspects of each item, one per column.
In that context, it seldom makes sense to select but not edit only one property of a single item. There may be use cases for it (might be handy to be able to select and copy only the title of a track in iTunes, for example), but it's not something NSTableView and NSOutlineView accommodate.
A spreadsheet is something very different. Every cell is a peer to every other; neither axis is necessarily subordinate to the other. A spreadsheet can be used as a table (e.g.: item, price, quantity, subtotal), but is not bound to the properties-of-items paradigm of NSTableView.
NSTableView's API bears this out. Note that a table view has selectedRowIndexes
and selectedColumnIndexes
, but no way to enumerate the column,row pairs that would identify selected individual cells.
You're best off implementing a custom view. You'd probably do well to emulate NSTableView's data source protocol—you could have spreadsheetView:objectValueForColumnIndex:rowIndex:
, for example—but otherwise, you have a lot of work ahead of you, particularly to implement editing.
Long-term, though, it's the best way, and the only way to get individual-cell selection.