Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa bug? Arrow keys stop working in table view



Hi, all. I wonder whether I've found a possible bug with the Cocoa GUI system. I have an NSTableView that I subclassed for delete-key and escape-key support, amongst other things. For some reason after I put the table view inside of a tab view (as the only child view of the first tab view item, I might add) the default (untouched!) arrow- key support stops working.

My key-handling code is as follows:

- (void)keyDown:(NSEvent *)event {
    consumedKeyDown = NO;
    [self interpretKeyEvents:[NSArray arrayWithObject:event]];
    if (!consumedKeyDown) [super keyDown:event];
}

- (void)doCommandBySelector:(SEL)selector {
    consumedKeyDown = [self tryToPerform:selector with:nil];
}

(Where consumedKeyDown is a BOOL instance variable set to NO in - awakeFromNib.)

Switching the table's class back to a regular table view solves the problem, as does commenting out the one line in -doCommandBySelector:

I haven't been able to find anything in the docs or in the archives to explain the lack of arrow key functionality that I'm experiencing. Does anyone have any pointers? Is the tab view interfering with the arrow keys somehow?

Regards,
	Andrew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.