Re: how to prevent TableView update on key repeat?
Re: how to prevent TableView update on key repeat?
- Subject: Re: how to prevent TableView update on key repeat?
- From: Quincey Morris <email@hidden>
- Date: Fri, 04 May 2012 13:29:59 -0700
On May 4, 2012, at 12:39 , Marc Respass wrote:
> This is working great. What do you think?
"Working great" sounds great!
If you want to go the extra mile for your users, you could try something like this:
CMTableView *tableview = [notification object];
NSTimeInterval delayInterval = 0.0;
if(tableview.isRepeating)
{
[detailView setEnabled: NO]; // or something that "dims" the detail view(s)
[spinningProgressIndicatorOnTopOfDetailView: setHidden: NO];
[spinningProgressIndicatorOnTopOfDetailView: startAnimating];
delayInterval = [NSEvent keyRepeatInterval] + 0.01;
}
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(selectionDidChange) object:nil];
[self performSelector:@selector(selectionDidChange) withObject:nil afterDelay:delayInterval];
and add something like the following to the *end* of your performed method:
[detailView setEnabled: YES];
[spinningProgressIndicatorOnTopOfDetailView: setHidden: YES];
[spinningProgressIndicatorOnTopOfDetailView: stopAnimating];
(Note that there's no need to condition this last on how you got there. It's always safe to do.)
At least, you could try it and see if they like it.
_______________________________________________
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