discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView progress


From: Andreas Höschler
Subject: Re: NSTableView progress
Date: Wed, 3 May 2006 22:05:22 +0200

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]