MouseTracker hysterisis

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MouseTracker hysterisis

Peter Goodall-4
Hi all,

I am using a MouseTracker for managing some dragging, and I'm not convinced
that the hystereis works. I set it to a huge amount, and find that it starts
tracking immediately.

Any ideas?

(MouseTracker forPresenter: self startingAt: eventPoint)
origin: eventPoint;
hysteresis: 200;
startTracking: self



--Peter G.


Reply | Threaded
Open this post in threaded view
|

Re: MouseTracker hysterisis

Blair McGlashan-2
"peterg" <[hidden email]> wrote in message
news:3f4caa36$0$15133$[hidden email]...
> Hi all,
>
> I am using a MouseTracker for managing some dragging, and I'm not
convinced
> that the hystereis works. I set it to a huge amount, and find that it
starts
> tracking immediately.

Try modifying the MouseTracker class>>defaultHysterisis method to return 200
(normally the hysterisis is a Point, but an integer will work fine) and then
initiating a drag from a class browser's method list. You should see that it
is working as intended, and that you have to move the mouse a very long way
before the drag starts.

>
> Any ideas?
>
> (MouseTracker forPresenter: self startingAt: eventPoint)
> origin: eventPoint;
> hysteresis: 200;
> startTracking: self

You're probably not using screen coordinates - i.e. if you are retrieving
eventPoint from some PointEvent, then you must use the #screenPosition
accessor, not the #position accessor.

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: MouseTracker hysterisis

Peter Goodall-4
Thanks Blair.