The esc Key is trapped like this inside the View controller that is loaded inside the window.
-(BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command { if (command == @selector(cancelOperation:)) { NSLog(@"escape key has been pressed"); } return NO; } I do not have access to the window instance. How do i get to the window? On 2009-12-18, at 9:48 AM, Graham Cox wrote: > > On 19/12/2009, at 1:35 AM, Sandro Noël wrote: > >> But how do I actually cancel the editing operation? > > Just make the outline view itself first responder. This will validate and > resign the text field if it's OK. > > [[outlineView window] makeFirstResponder:outlineView]; > > --Graham > > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com