Re: NSSlider unusual behavior
Re: NSSlider unusual behavior
- Subject: Re: NSSlider unusual behavior
- From: Raleigh Ledet <email@hidden>
- Date: Tue, 5 Sep 2006 09:06:00 -0700
I am curious because I am doing stuff in response to the slider's
position and I thought receiving the action message is a 100%-sure
indication the position has changed. Well, it seems at the ends of
the sliders this is not true. I can, of course, modify the code so
that it detects the slider position hasn't change. But that does not
seem elegant and logical at all (unless I am missing some conceptual
reasons for this behavior).
I should point out here that this behavior does not only occur at the
ends. Every time a mouse drag event comes through the system, the
NSSlider's action will get called (if set to continuous.) Try this,
move the mouse perfectly vertical. The slider value won't change, but
you action method will get called. (kind of difficult to do, though)
Or, if you want a much easier (and deadly) way to duplicate this, use
a graphics tablet and start dragging the slider then just hold the
slider place. You app will get flooded with mouse drag events. (Yes,
if the pen is on the tablet, regardless if you are moving the pen or
not, the tablet will continuously send drag events. This is mostly
due to the nature of tablet input. However, it's also quite difficult
to hold a pen on the tablet and not be constantly changing the
pressure, tilt, or some other pen characteristic that will come
through embedded in the mouse drag event.)
I would defiantly advise checking to make sure the value has actually
changed. If you action takes more than a tenth of a second, I
strongly advise you check that the value has changed before
performing the action.
-raleigh
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden