Re: clickCount question
Re: clickCount question
- Subject: Re: clickCount question
- From: Koen van der Drift <email@hidden>
- Date: Sun, 20 Jul 2003 21:39:42 -0400
On Sunday, July 20, 2003, at 03:27 PM, Julien Jalon wrote:
FYI, that interval is available via user defaults with the
"com.apple.mouse.doubleClickThreshold" key.
The problem is that due, to user defaults cache, the application may
not be aware of any change to this value. And since modifying this
value does not raise any distributed notification, it can be a pain to
make sure the application has it right.
I think, maybe using polling and synchronize on user defaults to be
sure...
Something like this:
[code snip];
Thanks again,
A problem is that the value of com.apple.mouse.doubleClickThreshold
might not be present, which will default cachedDblClickThreshold to
0.1, which results in a zero that is briefly visible. This actually
happened on my machine. I had to go into the mouse preferences and
click the click speed slider to set it's value in the global prefs. The
reason that my global prefs didn;t have a doubleClickThreshold could be
that I am using a Kensington mouse which adds it own prefs panel.
So I was thinking, one thing I learned from programming in Cocoa/ObjC
(and other frameworks) is that if you are struggling with the code,
probably the approach is wrong. Maybe I shouldn't test for
doubleClickThreshold within textViewDidChangeSelection? Is there a
possible other way to hook into the click event that will make it
easier to do this - maybe in the NSTextView itself?
thanks,
- Koen.
_______________________________________________
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.