• 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: How to trap for the delete key in NSOutlineView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to trap for the delete key in NSOutlineView?


  • Subject: Re: How to trap for the delete key in NSOutlineView?
  • From: Fritz Anderson <email@hidden>
  • Date: Mon, 20 Jun 2005 09:12:33 -0500

On 20 Jun 2005, at 8:12 AM, Theodore H. Smith wrote:

I'm trying to trap for the delete key in my NSOutlineView.
...
In IB, I defined an NSResponder subclass. I instantiated this object in IB. This NSResponde subclass has an outlet which is the outlineview whose keyboard events I want to handle. Then in the loading code for this NSResponder, do this:

    if ([MyOutline nextResponder] != self ) {
        [MyOutline setNextResponder:self];
    }
...
Within my NSResponder subclass I have this code:

- (void)interpretKeyEvents:(NSArray *)eventArray {
    [super interpretKeyEvents:eventArray]; //set a breakpoint here
}

This doesn't work.

You're assuming that NSOutlineView, before or after it does its processing in interpretKeyEvents:, passes events up the responder chain for additional processing. The documentation does not lead me to believe this is so.


What prevents you from subclassing NSOutlineView, overriding keyDown: so it responds to <delete>, and passes everything else to super?

    -- F

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to trap for the delete key in NSOutlineView?
      • From: "Theodore H. Smith" <email@hidden>
References: 
 >How to trap for the delete key in NSOutlineView? (From: "Theodore H. Smith" <email@hidden>)

  • Prev by Date: Re: NSLog doesn't work with OCUnit
  • Next by Date: Outline and Table back to front
  • Previous by thread: How to trap for the delete key in NSOutlineView?
  • Next by thread: Re: How to trap for the delete key in NSOutlineView?
  • Index(es):
    • Date
    • Thread