• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to prevent TableView update on key repeat?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to prevent TableView update on key repeat?


  • Subject: Re: how to prevent TableView update on key repeat?
  • From: Marc Respass <email@hidden>
  • Date: Thu, 03 May 2012 23:30:32 -0400

El may 3, 2012, a las 10:38 p.m., Graham Cox escribió:

>
> On 04/05/2012, at 11:25 AM, Marc Respass wrote:
>
>> Excellent. Thank you again. [NSEvent keyRepeatInterval] returned 0.833333 so I set the delay to 0.9 and it works perfectly. What was a slow process is now as smooth as can be. It even works correctly if I hold the up/down arrow until I get to the end. The delay to display once I stop the repeat is not noticeable. I just moved my selection code to a method and replaced it with this
>>
>>    [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(selectionDidChange) object:nil];
>>    [self performSelector:@selector(selectionDidChange) withObject:nil afterDelay:0.09];
>
>
> You probably should do this as your last line:
>
> [self performSelector:<blah> withObject:nil afterDelay:[NSEvent keyRepeatInterval] + 0.1];
>
> because the key repeat rate is set by the user in the "Keyboard" system preferences and can change.

Thanks Graham. I thought about using [NSEvent keyRepeatInterval] but didn't consider that it's user configurable.

Marc

_______________________________________________

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


References: 
 >how to prevent TableView update on key repeat? (From: Marc Respass <email@hidden>)
 >Re: how to prevent TableView update on key repeat? (From: Quincey Morris <email@hidden>)
 >Re: how to prevent TableView update on key repeat? (From: Marc Respass <email@hidden>)
 >Re: how to prevent TableView update on key repeat? (From: Quincey Morris <email@hidden>)
 >Re: how to prevent TableView update on key repeat? (From: Marc Respass <email@hidden>)
 >Re: how to prevent TableView update on key repeat? (From: Quincey Morris <email@hidden>)
 >Re: how to prevent TableView update on key repeat? (From: Marc Respass <email@hidden>)
 >Re: how to prevent TableView update on key repeat? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: No validation with a bound NSTableView and custom NSFormatter
  • Next by Date: Re: how to prevent TableView update on key repeat?
  • Previous by thread: Re: how to prevent TableView update on key repeat?
  • Next by thread: Re: how to prevent TableView update on key repeat?
  • Index(es):
    • Date
    • Thread