Waiting on NSTableView to finish changing selection
Waiting on NSTableView to finish changing selection
- Subject: Waiting on NSTableView to finish changing selection
- From: Allan Donald <email@hidden>
- Date: Wed, 8 Jul 2009 16:33:20 +0100
Hi all,
I've got an NSTableView that triggers some relatively expensive stuff
when its selection changes. If the user is holding down one of the
arrow keys to move through the list, I'd like to wait until they've
finished before starting the operation. (Somewhat akin to what
Mail.app does -- it won't update the message pane preview if the
user's scrolling through a long list of messages with the arrow keys)
Unfortunately tableViewSelectionDidChange really only works as I want
it to for mouse-driven selections -- when the selection is changed
with the arrow keys, it fires for every row the user passes while the
key is held down. And tableViewSelectionIsChanging only fires for
mouse-driven selection changes.
What is the best way to modify the behaviour to the way I want it? I'm
thinking right now about subclassing to get my hands on the keydown
and keyup events, but of course they're used for more than just
scrolling, and that doesn't feel like a very clean solution.
Thanks in advance,
Allan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden