NSTableView : editable cells & return key
NSTableView : editable cells & return key
- Subject: NSTableView : editable cells & return key
- From: Bruno Blondeau <email@hidden>
- Date: Thu, 17 Jan 2002 00:36:36 +0100
I'm using a NSTableView which text cells are user-editable.
However, when a user presses the return key, the edit field moves to the
next row, which is not the behavior a Mac user expects from most
applications. (the row should remain selected, not select the next row and
start editing it).
I'm currently using this, which I found somewhere on the web, but it only
selects the next row, not the current one.
- (void)controlTextDidEndEditing:(NSNotification *)aNotification {
[[[aNotification object] window]
performSelector:@selector(makeFirstResponder:) withObject:[aNotification
object] afterDelay:0];
}
I could always select manually the good row afterwards, but it is not a nice
user experience, since it is possible to see that the next row was selected
on screen.
Thanks in advance for your help,
Bruno Blondeau