Re: Outline View CancelEditing

2009-12-18 Thread Graham Cox
On 19/12/2009, at 3:32 AM, Sandro Noël wrote: > I do not have access to the window instance. > How do i get to the window? > Yes you do - all views have a -window property that returns it. --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple

Re: Outline View CancelEditing

2009-12-18 Thread Sandro Noël
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

Re: Outline View CancelEditing

2009-12-18 Thread Graham Cox
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 ___

Outline View CancelEditing

2009-12-18 Thread Sandro Noël
Hello In an outline View, listing the content of a directory with a custom Image/Text cell I would want to react to the "ESC" key press to cancel the current editing operation. Using my OutlineView Controller Delegate I can receive the notification that NSResponder's cancelOperation(esc) has b