Re: detecting a double click ahead of time
Re: detecting a double click ahead of time
- Subject: Re: detecting a double click ahead of time
- From: Bertil Holmberg <email@hidden>
- Date: Wed, 22 Oct 2003 11:53:17 +0200
Robert,
There is a thread in mamasam on "com.apple.mouse.doubleClickThreshold"
http://cocoa.mamasam.com/COCOADEV/2003/07/2/68727.php
Since this value might not be present, it could be a good idea to
bracket it within some reasonable values, perhaps like this:
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
// Get the default(?) doubleclick interval (0.457143)
doubleClickTime = [defaults
floatForKey:@"com.apple.mouse.doubleClickThreshold"];
// Make sure it has a reasonable duration
doubleClickTime = ( doubleClickTime < 0.2 ) ? 0.2 : doubleClickTime;
doubleClickTime = ( doubleClickTime > 0.75 ) ? 0.75 :
doubleClickTime;
Best wishes,
Bertil
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.