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

How to trap for the delete key in NSOutlineView?


  • Subject: How to trap for the delete key in NSOutlineView?
  • From: "Theodore H. Smith" <email@hidden>
  • Date: Mon, 20 Jun 2005 14:12:15 +0100

I'm trying to trap for the delete key in my NSOutlineView.

What I've been doing is this:

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];
    }

The conditional branch only fires once, no matter how many times I call this setup code, thus proving that the outlineview's nextResponder really is that responder I created. MyOutline is not nil, the object is connected and the nib loaded, by the time that this code runs.

Within my NSResponder subclass I have this code:

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

This doesn't work. The breakpoint never fires.

What am I doing wrong?

--
http://elfdata.com/plugin/ Industrial strength string processing, made easy.


"All things are logical. Putting free-will in the slot for premises in
a logical system, makes all of life both understandable, and free."

_______________________________________________
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: Fritz Anderson <email@hidden>
  • Prev by Date: Java/Cocoa save PNG file differences
  • Next by Date: Re: Simple bindings Boolean test for 'nothing selected'
  • Previous by thread: Re: Java/Cocoa save PNG file differences -- More.
  • Next by thread: Re: How to trap for the delete key in NSOutlineView?
  • Index(es):
    • Date
    • Thread