On Wed, Jul 8, 2009 at 8:33 AM, Allan Donald<li...@thehold.net> wrote: > 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)
Subclass NSTableView and override -keyDown: to set a flag (let's call it isKeyedScrolling) when appropriate. Override -keyUp:, and if isKeyedScrolling is true then fire a custom delegate method which performs your expensive update. Then clear isKeyedScrolling. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com