How to trap for the delete key in NSOutlineView?
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