[Q] doubleclickable and dragable morph: how?
Rudi Angela
Olmeca at netscape.net
Sat May 10 08:05:49 UTC 2003
Thanks Ned, that did the trick! That was indeed the kind of solution I hoped for, instead of the #handlesMouseDown track.
Now I have a dragable morph that has a single-click and doubleclick behavior.
But I noticed now that if you provide a single-click handler by using:
on: #click send:#doSingleClick to: self
the handler is called on the mouseDown, rather than mouseUp. I was expecting the latter and I recall in one of your previous submissions on this subject you also indicated this in a diagram. I would rather have single-clicks and doubleclicks to be fired at mouseUp. But then maybe that's a totally different discussion. Just thought I'd let you know your diagram had a flaw.
thanks for the fix, Rudi
On May 9 Ned Konz wrote:
OK, after thinking about this, hearing the (very correct) warnings
from Andreas and Lex, fixing the doubleClick logic in
MouseClickState, etc., here's my recommendation for a
double-clickable Morph that is also draggable. Much simpler and safer
than overriding mouseDown: etc.
MyMorph>>initialize
super initialize.
self on: #doubleClick send: #changeColor to: self.
self on: #startDrag send: #grabMe to: self
MyMorph>>grabMe
ActiveHand grabMorph: self
__________________________________________________________________
Try AOL and get 1045 hours FREE for 45 days!
http://free.aol.com/tryaolfree/index.adp?375380
Get AOL Instant Messenger 5.1 free of charge. Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
More information about the Squeak-dev
mailing list
|