This has been a known bug for a long time.
Your mail motivated me to fix it.
You need to update Roassal :-)
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Oct 6, 2014, at 5:11 PM, Peter Uhnák
i.uhnak@gmail.com wrote:
> Hi,
>
> I've encountered a bug with TRMouseMove.
> When registered on canvas it doesn't get fired when mouse is over an element which has any callback registered.
>
> In TRMorph>>rtMouseMoving:
> line shape := self shapeWithActionForPositionInPixels: relativePosition. doesn't respect what kind of event is actually registered to the shape - so if I register TRMouseClick on a box, TRMouseMove on canvas will not work.
>
> I would expect the event to always get fired for canvas.
>
> Peter
>
> demo:
> ------------
> view := RTView new.
>
> lbl := RTLabel new elementOn: 'position'.
> view add: lbl.
> badBox := RTBox new size: 50; color: Color red; element.
> badBox translateBy: -50 @ -50.
> view add: badBox.
>
> goodBox := RTBox new size: 50; color: Color green; element.
> goodBox translateBy: 50 @ -50.
> view add: goodBox.
>
> badBox
> when: TRMouseClick
> do: [ ].
>
> view
> when:TRMouseMove
> do: [ :evt |
> lbl shape text: (view canvas camera fromPixelToSpace: evt position) printString. lbl update.
> view signalUpdate ].
>
> view open.
> ----------------
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev