Re: tabbing between controls
Re: tabbing between controls
- Subject: Re: tabbing between controls
- From: Michael Rothwell <email@hidden>
- Date: Wed, 26 Nov 2003 09:04:34 -0500
On Nov 25, 2003, at 11:12 PM, Laurent Daudelin wrote:
>
Did you connect the 'nextKeyView' outlet properly in IB?
>
I think so. I've subclasses the NSTableViews, though, so that I can
catch certain key events (delete and return):
- (void)keyDown:(NSEvent *)event
{
unichar key = [[event charactersIgnoringModifiers]
characterAtIndex:0];
unsigned int flags = [event modifierFlags];
if (key == NSDeleteCharacter
&& [self numberOfRows] > 0
&& [self selectedRow] != -1)
{
NSLog(@"keyDown: delete key");
[[ self delegate] deleteRTVPressed:self];
return;
};
if (key == 13
&& [self numberOfRows] > 0
&& [self selectedRow] != -1)
{
NSLog(@"keyDown: return key");
[[ self delegate] tableViewSelected:self];
return;
};
NSLog(@"keyDown: key:%d flags:%d", key, flags);
[super keyDown:event]; // let somebody else handle the event
}
_______________________________________________
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.