Hello all,

Do you remember the pieces of code you added or
modified for this
feature? I assume pressing TAB in the last column of
a row does the
same!?


in -textDidEndEditing i impleneted
NSReturnTextMovement
tab is implemented but i haven't tested it much.
I believe there are at least issues with
_editNext/Previous not selecting the newly edited row.


I just implemented the following in NSTableView to make tabbing to the next row work:

- (BOOL)_editNextEditableCellAfterRow:(int)row column: (int)column
{
   int i, j;

   if (row > -1)
     {
      // First look for cells in the same row
      for (j = column + 1; j < _numberOfColumns; j++)
        {
if (_isCellEditable (_delegate, _tableColumns, self, row, j) == YES)
           {
            [self editColumn: j  row: row  withEvent: nil  select: YES];
            return YES;
           }
        }
     }
  // Otherwise, make the big cycle.
   for (i = row + 1; i < _numberOfRows; i++)
     {
[self selectRow:i byExtendingSelection:NO]; // <-- add this to make tabbing over row boundaries work

      for (j = 0; j < _numberOfColumns; j++)
        {
if (_isCellEditable (_delegate, _tableColumns, self, i, j) == YES)
           {
            [self editColumn: j  row: i  withEvent: nil  select: YES];
            NSLog(@"row YES editColumn: %d row: %d", j, i);
            return YES;
           }
        }
     }
   return NO;
}

Regards,

  Andreas



_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to