• 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: ESC while editing NSOutlineView subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ESC while editing NSOutlineView subclass


  • Subject: Re: ESC while editing NSOutlineView subclass
  • From: Jim Correia <email@hidden>
  • Date: Thu, 23 Apr 2009 18:32:04 -0400

On Thu, Apr 23, 2009 at 5:16 PM, Kevin Gessner <email@hidden>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 keyCode]) {
>        case returnKeyCode:
>            if([[self delegate] respondsToSelector:@selector(newSiblingInEditor:)])
> {
>                [(NSObject<MyEditorOutlineViewDelegate> *)[self delegate]
> newSiblingInEditor:self];
>            }
>            break;
>    }
> }
>
> But it's never called when there's an editing session.


When you are in the middle of an editing session, the first responder is the
field editor. The field editor receives, and consumes, the keydown events.

Look at the NSResponder documentation for the -cancelOperation: method. This
should be bubbled up the responder chain if when escaped is pressed and the
field editor is active.

- Jim
_______________________________________________

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

References: 
 >ESC while editing NSOutlineView subclass (From: Kevin Gessner <email@hidden>)
 >Re: ESC while editing NSOutlineView subclass (From: Corbin Dunn <email@hidden>)
 >Re: ESC while editing NSOutlineView subclass (From: Kevin Gessner <email@hidden>)

  • Prev by Date: XCode Debugger Summary Format
  • Next by Date: Re: NSTableView variable row height and noteHeightOfRowsWithIndexesChanged during live resize
  • Previous by thread: Re: ESC while editing NSOutlineView subclass
  • Next by thread: Playing movie under 10.4 behaving differently than under 10.5
  • Index(es):
    • Date
    • Thread