[Pharo-project] Mouse move and button down events

Ricardo Moran richi.moran at gmail.com
Mon Mar 12 22:21:00 EDT 2012


Alternatively, you can suscribe your Parent morph to listen all the mouse
events and then do something if the event is #mouseMove.
Find an example attached. I hope it helps.

Cheers,
Richo

On Wed, Mar 7, 2012 at 7:53 AM, Hilaire Fernandes <
hilaire.fernandes at edu.ge.ch> wrote:

> I did this ugly hack
>
> Child>>handleMouseMove: evt
>        self owner owner owner mouseMove: evt
>
> I would like a cleaner way to handle it.
>
>
>
> Le 07/03/2012 11:16, Hilaire Fernandes a écrit :
> > Hello,
> >
> > I have two embedded morphs: a parent and a child.
> >
> > On the child I want to handle mouse down event,
> >
> > Child>>handlesMouseDown: event
> > ^true
> >
> > On parent I want to handle mouse down+move event:
> >
> > There are not distinct handlesMouseMove, only
> > Parent>>handlesMouseDown: event
> > ^true
> >
> > Now, events received by child handlesMouseDown are always
> > MouseButtonEvent, never MouveMoveEvent, so no chance to answer true or
> > false accordingly. I guess MouseButtonEvent is catched first, then other
> > mouseMove event discarded
> >
> > What I want is the child to received clic events, but the parent move
> > events. It does not seem possible, am I wrong?
> >
> >
>
>
> --
> Dr. Geo -- http://www.drgeo.eu
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20120312/3a825e1f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Prueba.st
Type: application/octet-stream
Size: 1340 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20120312/3a825e1f/attachment.st>


More information about the Pharo-dev mailing list