Mac Objective C NSTableView and NSTextViewCell, know when user edits cell is done

StackOverflow https://stackoverflow.com/questions/17732884

  •  03-06-2022
  •  | 
  •  

سؤال

Not sure why this is elusive, have looked at the docs. How to know when the user edits a NSTableViewCell in an NSTableView?

Have setup the Text Filed Cell in IB Action to Sent On End Editing and hooked up the sent action, but no joy.... it does not get called when user is done editing a cell.

هل كانت مفيدة؟

المحلول

#pragma mark - Text Table Delegates

- (BOOL) control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
{
    self.editingString = [[NSString alloc] initWithString:fieldEditor.string];
    [self performSelector:@selector(updateSelection) withObject:nil afterDelay:0.1];
    return YES;
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top