Re: deleting outline rows using a delegate
Re: deleting outline rows using a delegate
- Subject: Re: deleting outline rows using a delegate
- From: Cryx <email@hidden>
- Date: Mon, 17 Jun 2002 02:58:38 -0500
On Sunday, June 16, 2002, at 12:46 PM, Cryx wrote:
I'd simply like for the delete key to trigger the removal of rows from
an outline view. I know how to do this with a subclass, but not from a
delegate. The documentation leads me to believe that
doCommandBySelector: should be sent to the delegate, but it's not.
I thought I knew how to do this with a subclass, however it appears that
something is hijacking the responder chain. I successfully rehijacked
the responder chain, but I really think I'm cheating:
@implementation MyOutlineView
- (void)keyDown:(NSEvent *)event {
consumedKeyDown = NO;
[self interpretKeyEvents:[NSArray arrayWithObject:event]];
if (consumedKeyDown == NO) [super keyDown:event];
}
- (void)doCommandBySelector:(SEL)selector {
consumedKeyDown = [self tryToPerform:selector with:nil];
}
- (void)deleteBackward:(id)sender { /* remove item from outline */ }
- (void)deleteForward:(id)sender { /* remove item from outline */ }
@end
How may I properly utilize the responder chain to achieve this same
result?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.