MouseMoveEvents

Andreas Raab andreas.raab at gmx.de
Tue Aug 12 18:13:45 UTC 2003


> Is this intended?

No, this is a bug. The start point should be set to the position where the
hand is, e.g.,

HandMorph>>generateMouseEvent: evtBuf 

	"..."

	^MouseMoveEvent new 
		setType: type
		startPoint: self position "<- here"
		endPoint: trail last

Cheers,
  - Andreas

> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On 
> Behalf Of Eddie Cottongim
> Sent: Tuesday, August 12, 2003 8:11 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: MouseMoveEvents
> 
> 
> While I was trying to use MouseMoveEvents I noticed something I don't
> understand.
> 
> You can query a MouseMoveEvent for its starting and ending 
> points. If I move
> the mouse slowly, I'm finding that startingpoint always 
> equals endingpoint.
> I understand that occasionally zero-length moves may come in. 
> What I mean is
> that starting point is never different from ending point, 
> even though the
> mouse has moved.
> 
> Here's what I mean. The events coming in look like this:
> starting            ending
> 148 at 148        148 at 148
> 149 at 148        149 at 148
> 150 at 148        150 at 148
> 
> If the mouse has moved, shouldn't starting point be different 
> than ending
> point for at least one of the mouseMoves?
> 
> One way you can check this out is by adding this statement to
> HandMorph>>handleEvent:, preferably inside the ShowEvents 
> block so you can
> turn it on and off  with "HandMorph showEvents: true":
> 
> (evt isKindOf: MouseMoveEvent ) ifTrue:[ ((evt 
> startPoint)~=(evt endPoint))
> ifTrue:[self beep] ].
> 
> This will beep when a non-zero length mouseMove comes in. If 
> I move the
> mouse slowly, this never happens! If I move it quickly, the 
> beeps happen
> frequently, which is what I expect.
> 
> Is this intended?
> 
> Eddie
> 
> PS.  Ok, for fun I turned ON the higherPerformance 
> preference. Now, the
> startingPoint=endingPoint practically all the time, 
> regardless of how fast I
> move the mouse. with higherPerformance on I would expect the 
> moves to be
> perhaps smaller, but still, it seems like the mouseMoves 
> should report a
> delta occasionally at least.
> 
> 
> 
> 
> 
> 
> 
> 
> 



More information about the Squeak-dev mailing list