could you sahre your result?
May be publish it on Squeaksource.com?

Stef
On 18 mars 07, at 07:27, [EMAIL PROTECTED] wrote:

Thanks, I already got it working, which was in fact a very satisfying experience. My previous failure was using a "handlesMousedown" method, rather than "handlesMouseDown:evt" method. An important distinction.

Sent via BlackBerry from T-Mobile

-----Original Message-----
From: Michael van der Gulik <[EMAIL PROTECTED]>
Date: Sat, 17 Mar 2007 17:45:07
To:"A friendly place to get answers to even the most basic questions aboutSqueak." <beginners@lists.squeakfoundation.org>
Subject: Re: [Newbies] Morphic event-handling confusion

Max OrHai wrote:



handlesMouseStillDown: evt
   ^ true

mouseStillDown: evt
   self position: evt hand position.



These apparently don't do anything. But, that's OK, because I can, as
Bert suggested, just send "evt hand #grabMorph: self".

Except, oops, that's NOT OK, because now mouseUp: apparently never gets
sent to my Morph.

So, I still need help. Thank you both very much.


They "worked for me" - I was dragging a Morph around, and had readouts
for the start and end positions of the dragging. Try making a completely fresh subclass of Morph with only the methods I suggested. I used Squeak
3.9.

If I was going to implement momentum, I'd take the current position on
mouseUp: and the position received by the very latest mouseStillDown:,
and work out which vector the puck should travel in from that. I suppose
you'd also need the times of those two events as well to calculate the
velocity vector.

Michael.
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to