Re: Getting the final value from an NSSlider drag
Re: Getting the final value from an NSSlider drag
- Subject: Re: Getting the final value from an NSSlider drag
- From: Graham Cox <email@hidden>
- Date: Wed, 30 Dec 2015 12:18:30 +1100
> On 30 Dec 2015, at 9:45 AM, Ken Thomases <email@hidden> wrote:
>
> This gives false positives if the user simply stops moving the mouse but doesn't release the mouse button. There's no delay you can specify that avoids this, since there's no upper bound to how long the user can hold the mouse button. (With assistive technologies, the user doesn't even have to be actually holding anything for the duration.)
>
True, but if that matters you can look at the mouse button state as part of your logic.
The point I was making is that there is a “retriggerable timer” mechanism available to any NSObject, so it usually makes sense to use it where possible rather than rolling your own timer or subclassing the control.
—Graham
_______________________________________________
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