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.
----------------