Blocking Selection in Columns of NSTableView

  • I have researched this one and tried a variety of things.  My tables
    have at least two columns in which I do not wish to trigger row selection.
    The first column is a set of line numbers from a data source, but in which I
    would like to identify the row clicked.  (I may want to change text color in
    the row clicked to indicate something.)

        The second column contains toggle buttons showing either nothing or the
    letter 'X' and is bound to a BOOL in the table's data array.

        I tried "tableView:shouldSelectRow" and
    "tableView:shouldSelectTableColumn: but wasn't able to do what I wanted.
    What is the best way to 1.  Block Selection?  2. Capture which row was
    clicked in a column?  "columnClicked" and "rowClicked" don't seem to get it
    (or maybe I'm trying to intercept too late).
previous month september 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today