I have an NSTableView. During editing, if I click a tab, it automatically moves to the next column. This is fantastic, but when I edit the field in the last column and I click on the tab, I would like to focus to go to the first column of the NEXT row.
Any suggestions?
Thanks to Michael for the starter code, it was very close to what ended up working! Here is the last code I used, hope it will be useful to someone else:
- (void) textDidEndEditing: (NSNotification *) notification { NSInteger editedColumn = [self editedColumn]; NSInteger editedRow = [self editedRow]; NSInteger lastColumn = [[self tableColumns] count] - 1; NSDictionary *userInfo = [notification userInfo]; int textMovement = [[userInfo valueForKey:@"NSTextMovement"] intValue]; [super textDidEndEditing: notification]; if ( (editedColumn == lastColumn) && (textMovement == NSTabTextMovement) && editedRow < ([self numberOfRows] - 1) ) {
source share