add |-textDidEndEditing:| override to ExtendedTableView like already existed

in ExtendedOutlineView so that it doesn't select another cell when inline
editing is complete
This commit is contained in:
pinkerton%aol.net 2004-02-11 18:29:10 +00:00
parent 0d27d0637f
commit 22252ef8a6
2 changed files with 27 additions and 1 deletions

View File

@ -217,7 +217,13 @@
return [self menu];
}
//
// -textDidEndEditing:
//
// Called when the object we're editing is done. The default behavior is to
// select another editable item, but that's not the behavior we want. We just
// want to keep the selection on what was being editing.
//
- (void)textDidEndEditing:(NSNotification *)aNotification
{
// Fake our own notification. We pretend that the editing was canceled due to a

View File

@ -94,4 +94,24 @@
return nil;
}
//
// -textDidEndEditing:
//
// Called when the object we're editing is done. The default behavior is to
// select another editable item, but that's not the behavior we want. We just
// want to keep the selection on what was being editing.
//
- (void)textDidEndEditing:(NSNotification *)aNotification
{
// Fake our own notification. We pretend that the editing was canceled due to a
// mouse click. This prevents outlineviw from selecting another cell for editing.
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:NSIllegalTextMovement] forKey:@"NSTextMovement"];
NSNotification *fakeNotification = [NSNotification notificationWithName:[aNotification name] object:[aNotification object] userInfo:userInfo];
[super textDidEndEditing:fakeNotification];
// Make ourself first responder again
[[self window] makeFirstResponder:self];
}
@end