NSTableView--responding to clicks
NSTableView--responding to clicks
- Subject: NSTableView--responding to clicks
- From: "Nathan V. Roberts" <email@hidden>
- Date: Mon, 9 Jul 2001 13:15:55 -0500
Hello,
I'd like to implement an NSTableView to do the following:
- allow editing of cells via double-click, as usual
- on single-click of a row, call an action method
Specifically, I need to distinguish between selection of a row by
clicking and selection by, e.g., hitting return to edit the next cell
down.
Reading the NSTableView docs, it sounds like a method specified by
setAction will not be called unless the cell is not editable. So I
figured maybe the way to do this would be to make the cell not
editable, but then create a doubleAction method as well, and make
that programmatically set the edit location, etc. So I disabled
editing by implementing tableViewShouldEditLocation in the delegate
and always returning false, which successfully disables editing
everywhere, but my action method still isn't being invoked.
Am I on the right track here? This seems a little awkward. And, it
isn't working just now...
TIA,
Nathan Roberts