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 protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
