Error from my part, it works well :

-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=
v := RTView new.

box1:= ((RTBox new color: Color lightGreen; extent: 40 @ 20) elementOn:1).
box2:= ((RTBox new color: Color lightBlue; extent: 40 @ 20) elementOn:2) translateTo: (0@80).
button:= ((RTEllipse new color: Color red; size: 20) elementOn:3) translateTo: (0@40).

v add: box2; add: button; add: box1.

button when: TRMouseEnter do: [ :evt |
    v addAnimation: (RTLinearMove to: (box2 position) during: 1 on: box1)].

box1 when: TRMouseClick do: [ :evt |
    box2 remove].

v
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

The problem came from the event himself, as i reinitialized the position of the moving element in the event, so the mouse leave and enter again the element just under as exemple follow:

-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
v := RTView new.

box1:= ((RTBox new color: Color lightGreen; extent: 40 @ 20) elementOn:1).
box2:= ((RTBox new color: Color lightBlue; extent: 40 @ 20) elementOn:2) translateTo: (0@80).
button:= ((RTEllipse new color: Color red; size: 20) elementOn:3) translateTo: (0@40).

v add: box2; add: button; add: box1.

button when: TRMouseEnter do: [ :evt |
    box1 translateTo: 0@0.
    v addAnimation: (RTLinearMove to: (box2 position) during: 1 on: box1)].

box1 when: TRMouseClick do: [ :evt |
    box2 remove].

v
-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-



2014-12-11 10:29 GMT-03:00 Alexandre Bergel <alexandre.bergel@me.com>:
Do you have a code snippet?

Alexandre


> On Dec 10, 2014, at 11:11 AM, Pierre CHANSON <chans.pierre@gmail.com> wrote:
>
> Hi everyone,
>
> There is a behavior of event TRMouseClick that seems anormal to me.
> For example I can't define a TRMouseClick on an element before it appears in a view via a little animation, because if the element pass by my mouse cursor, it will freeze. It seems that the element detect that the mouse cursor is on him and might click on him.
> That behavior would be normal with TRMouseEnter for exemple but a click should be just a click right ?
>
> Pierre Chanson
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev