On Thu, Apr 23, 2009 at 5:16 PM, Kevin Gessner wrote:
I've got this in MyEditorOutlineView, my NSOutlineView subclass.
>
> - (void)keyDown:(NSEvent *)theEvent {
>[super keyDown:theEvent];
>
>NSLog(@"keyDown: %d", [theEvent keyCode]);
>
>#define returnKeyCode 36
>switch([theEvent ke
I've got this in MyEditorOutlineView, my NSOutlineView subclass.
- (void)keyDown:(NSEvent *)theEvent {
[super keyDown:theEvent];
NSLog(@"keyDown: %d", [theEvent keyCode]);
#define returnKeyCode 36
switch([theEvent keyCode]) {
case returnKeyCode:
if([[self del
The easiest way to do this is to just subclass tableview and override
keyDown:. IE:
- (void)keyDown:(NSEvent *)theEvent {
NSString *keyString = [theEvent charactersIgnoringModifiers];
unichar keyChar = ([keyString length]) > 0 ? [keyString
characterAtIndex:0] : 0;
BOOL handledKey
called?
U
> From: ke...@kevingessner.com
> To: cocoa-dev@lists.apple.com
> Date: Thu, 23 Apr 2009 15:04:52 +0200
> Subject: ESC while editing NSOutlineView subclass
>
> Hello list,
>
> I've created a subclass of NSOutlineView, MyEditorOutlineView
> (implements only te
Hello list,
I've created a subclass of NSOutlineView, MyEditorOutlineView
(implements only textDidEndEditing: and keyDown:). When a row is being
edited, I'd like the escape key to stop editing. I'm having trouble
working with the field editor.
I implemented - (BOOL)control:(NSControl *)co