Hello,
I want to be able to navigate in a table view with the tab key.  So i
subclassed NSTableView and i added the overwrite the method


- (void) textDidEndEditing: (NSNotification *) notification

{

    CellLoc editedCell;

    editedCell.col = [super editedColumn];

    editedCell.row = [super editedRow];


    NSDictionary *userInfo = [notification userInfo];

    int textMovement = [[userInfo valueForKey:@"NSTextMovement"] intValue];


    [super textDidEndEditing:notification];



    if (textMovement == NSTabTextMovement)

    {


        CellLoc nextCell = [self nextEditableCell:editedCell];



        [self selectRowIndexes:[NSIndexSet indexSetWithIndex:nextCell.row]
byExtendingSelection:NO];

        if(nextCell.row > editedCell.row)

            [self editColumn:nextCell.col row:nextCell.row withEvent: nil
select: YES];




    }

}



CellLoc is a dummy struc containing row and col.

The problem is that the movement in cells is ok but when editColumn is
called the elements edited are cancelled.  So it is like i didn't change
the text.  (I use a datasource
and -tableView:setObjectValue:forTableColumn:row: is not called)


i tried moving [super textDidEndEditing:notification]; at the end of the
call but it doesn't solve the probles.  What can I do?


Thanks a lot


Frol
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to