About HandMorph and its dragged submorphs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

About HandMorph and its dragged submorphs

Fernando olivero
Can a morph currently being dragged by the hand receive a notification whenever the hands moves?

I couldnt find any conceptual hook by looking at HandMorph  or Morph. Also senders of #isHandMorph dont reveal anything.


HandMorph>>position: aPoint
        ....
        self privateFullMoveBy: ....

Morph>> privateFullMoveBy: delta
        "Private! Relocate me and all of my subMorphs by recursion. Subclasses that implement different coordinate systems may override this method."


My workaround is this  add a hook on the following method, which recursively gets  sent whenever HandMorph>>position: is evaluated.

ADDED:
 
MyMorph>>privateFullMoveBy: delta
        super privateFullMoveBy: delta.
        owner isHandMorph ifTrue:[  self actOnHandMove  ].

Anyone solved this problem before?

Thanks,
Fernando
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: About HandMorph and its dragged submorphs

Stéphane Ducasse
did you check the genie code?
because he needed event.

Stef

On Apr 16, 2010, at 4:43 PM, Fernando olivero wrote:

> Can a morph currently being dragged by the hand receive a notification whenever the hands moves?
>
> I couldnt find any conceptual hook by looking at HandMorph  or Morph. Also senders of #isHandMorph dont reveal anything.
>
>
> HandMorph>>position: aPoint
> ....
> self privateFullMoveBy: ....
>
> Morph>> privateFullMoveBy: delta
> "Private! Relocate me and all of my subMorphs by recursion. Subclasses that implement different coordinate systems may override this method."
>
>
> My workaround is this  add a hook on the following method, which recursively gets  sent whenever HandMorph>>position: is evaluated.
>
> ADDED:
>
> MyMorph>>privateFullMoveBy: delta
> super privateFullMoveBy: delta.
> owner isHandMorph ifTrue:[  self actOnHandMove  ].
>
> Anyone solved this problem before?
>
> Thanks,
> Fernando
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project