[Q] doubleclickable and dragable morph: how?

Hernan Tylim htylim at yahoo.com.ar
Thu May 1 14:58:33 UTC 2003


I just want to say that #handlesMouseDown: is used in many places inside
the image and also in many tutorials (right now I recall the John
Maloney tutorial 'An Introduction To Morphic: The Squeak User Interface
Framework'). And that's probably the reason why many newbies (me
included) have started using those methods.

By the way, why are those methods dangerous? Because they interfer with
the #on:send:to: morphic event handling? Always calling super at the
begining of #mouseDown:, #mouseUp, #mouseEnter, ..., would help?

Thanks

Regards
Hernán

> -----Mensaje original-----
> De: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] En 
> nombre de tblanchard at mac.com
> Enviado el: Jueves, 01 de Mayo de 2003 01:05 a.m.
> Para: The general-purpose Squeak developers list
> Asunto: Re: [Q] doubleclickable and dragable morph: how?
> 
> 
> Yeah, I'd vote that these be moved into a category called 
> 'private-events-processing' or something like it to make the point.  
> Comments in the methods with big warnings would be good too.
> 
> Those seem to be the first methods new users (including this one) go 
> after to hook an event.
> 
> On Wednesday, April 30, 2003, at 08:17  PM, Andreas Raab wrote:
> 
> > Try:
> >
> > 	myMorph on: #startDrag send: #onDrag to: myMorph.
> > 	myMorph on: #doubleClick send: #onDoubleClick to: myMorph.
> >
> > Note that #handlesMouseDown: should be never ever overridden unless 
> > you know
> > EXACTLY what you are doing. You're starting to infere with 
> some deep 
> > down
> > notions of Morphic and likely to break more than you (think 
> you) fix.
> >
> > Cheers,
> >   - Andreas
> >
> >> -----Original Message-----
> >> From: squeak-dev-bounces at lists.squeakfoundation.org
> >> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On
> >> Behalf Of Rudi Angela
> >> Sent: Wednesday, April 30, 2003 8:05 PM
> >> To: squeak-dev at lists.squeakfoundation.org
> >> Subject: [Q] doubleclickable and dragable morph: how?
> >>
> >>
> >> I have a Morph subclass, which is dragable by default. Now I
> >> would also like to make it doubleclickable. But if I start
> >> adding the methods #handlesMouseDown, etc, then apparently I
> >> loose the dragability. Am I doing something wrong? Or does
> >> Morphic not support this combination of behaviors?
> >>
> >> Rudi Angela
> >>
> >> __________________________________________________________________
> >> Try AOL and get 1045 hours FREE for 45 days!
> >> http://free.aol.com/tryaolfree/index.adp?375380
> >>
> >> Get AOL Instant Messenger 5.1 for FREE! Download Now!
> >> http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
> >>
> >
> >
> 
> 



More information about the Squeak-dev mailing list