Leopard and default NSTableView tab behavior

  • I just noticed today that the default NSTableView tab behavior in Leopard
    has changed from what it was in Tiger.
    Before, when editing cells in a table and tabbing from cell to cell, when
    you were editing the cell in the last column, the next tab key would take
    you to the first cell of the next row, set the state to editing, and the
    selection to the text of the cell.

    Now, in 10.5, the next tab leaves the table and takes you to the next key
    view. I really don't understand this change. Is there any way to still use
    what was the default Tiger behavior without having to reimplement the wheel?
    I checked the docs but didn't notice anything new that might effect this.
  • On Oct 30, 2007, at 6:09 PM, Michael Dupuis wrote:

    > I just noticed today that the default NSTableView tab behavior in
    > Leopard
    > has changed from what it was in Tiger.

    I also suggest reading the release notes for AppKit:

    http://developer.apple.com/releasenotes/Cocoa/AppKit.html#NSTableView

    > Before, when editing cells in a table and tabbing from cell to cell,
    > when
    > you were editing the cell in the last column, the next tab key would
    > take
    > you to the first cell of the next row, set the state to editing, and
    > the
    > selection to the text of the cell.

    Yes -- tableview now has keyboard navigation for cells! This is a huge
    step forward for keyboard users. You can tab to button cells (or
    popups) and invoke them with the space bar.

    >
    >
    > Now, in 10.5, the next tab leaves the table and takes you to the
    > next key
    > view. I really don't understand this change.

    Without this ability, there would be no way to "tab out" of an
    NSTableView. You may have noticed that Enter no longer edits the next
    row in the same column.

    AppKit (including NSTableView) need to do the most common cases really
    well. We found out that most people are adding in code to suppress
    this type of behavior, and make it more like Finder. So, for
    consistency throughout the OS, we made this change in NSTableView.

    > Is there any way to still use
    > what was the default Tiger behavior without having to reimplement
    > the wheel?

    For some apps (such as spreadsheets), this type of editing does make
    sense, and now it needs to be coded in. Override -
    (void)textDidEndEditing:(NSNotification *)notification and edit the
    next cell that you want (after calling super). And/Or modify the
    NSTextMovement key in the userInfo NSNotification dictionary.

    >
    > I checked the docs but didn't notice anything new that might effect
    > this.

    http://developer.apple.com/releasenotes/Cocoa/AppKit.html#NSTableView
    has this outlined.

    thanks,
    corbin
previous month october 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 31        
Go to today