Re: NSTableView ignoring arrow keys (solved)
Re: NSTableView ignoring arrow keys (solved)
- Subject: Re: NSTableView ignoring arrow keys (solved)
- From: Pete Yandell <email@hidden>
- Date: Tue, 17 Jun 2003 09:07:25 +1000
Ah ha!
OK, so I was wrong: NSTableView and NSOutlineView do handle arrow keys
by default!
My problem was that I was overriding keyDown: (to allow the delete key
to be used to delete rows) and had assumed that interpretKeyEvents:
would handle everything for me.
Time to go and simplify my code. :)
On Tuesday, June 17, 2003, at 03:26 AM, Chris Silverberg wrote:
I have a somewhat complex window that contains a couple table views.
Last
night I noticed a bug in my application... they up/down arrow keys
are no
longer working to change the selection in my tables.
I just found the problem. A few days ago I added OmniAppKit to my
project
to take advantage of their wonderful Preferences window support.
Well, this
had a side effect of breaking arrow keys for my tables.
The reason this occurs is because OmniAppKit has a category for
NSTableView
and they override the original implementation of keyDown in order to
support
a type-ahead feature. (Which I may just want to use :-). However,
there is
a problem... if they decide not to handle the key event, they try to
give it
back to the table via the line:
[self interpretKeyEvents:[NSArray arrayWithObject:theEvent]];
Well, that doesn't work as the arrow keys are likely handled in
NSTableView's keyDown implementation.... so as a result they are simply
ignored.
So, this will probably need to be fixed by changing how keyDown is
implemented. Instead of just doing a straight override of keyDown,
I'll
tweak it to use their OBReplaceMethodImplementationWithSelector
support so
that the original keyDown will still be available to call. Then I
should be
in business.
thanks,
Chris
_______________________________________________
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.
Pete Yandell
http://pete.yandell.com/
_______________________________________________
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.