• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Outline View CancelEditing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Outline View CancelEditing


  • Subject: Re: Outline View CancelEditing
  • From: Sandro Noël <email@hidden>
  • Date: Fri, 18 Dec 2009 11:32:27 -0500

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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Outline View CancelEditing
      • From: Graham Cox <email@hidden>
References: 
 >Outline View CancelEditing (From: Sandro Noël <email@hidden>)
 >Re: Outline View CancelEditing (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Thread safe QT playback
  • Next by Date: Re: launching login items in root context
  • Previous by thread: Re: Outline View CancelEditing
  • Next by thread: Re: Outline View CancelEditing
  • Index(es):
    • Date
    • Thread