may be the behavior is normal because it wants to encode that 
        - if we press and keep pressed and get outside the morph then nothing 
should happen once we release the button.

Now there is still something strange.
It is really slow and this behavior should be customised because for certain 
cases I just want to get the click in any situation.

Stef (good night now for real). 

On May 20, 2013, at 10:50 PM, Stéphane Ducasse <stephane.duca...@inria.fr> 
wrote:

> Hi
> 
> It seems that the bug is link with the fact that the cursor get outside the 
> bounds or not.
> If you click and do not move or move but stay inside the morph it is ok
> Now if you click and the mouse gets outside the bounds we get the funny and 
> bad behavior.
> 
> I'm definitely exhausted now to think…. but here is the code for the night 
> hackers :)
> 
> 
> 
> 
> mouseDown: evt
> 
>       oldColor := self fillStyle.
> 
> mouseMove: evt
> 
>       (self containsPoint: evt cursorPoint)
>               ifTrue: [self setSwitchState: (oldColor = offColor)]
>               ifFalse: [self setSwitchState: (oldColor = onColor)].
> 
> mouseUp: evt
> 
>       (self containsPoint: evt cursorPoint)
>               ifTrue: [  "toggle and do action"
>                       self setSwitchState: (oldColor = offColor).
>                       self doButtonAction]
>               ifFalse: [  "restore old appearance"
>                       self setSwitchState: (oldColor = onColor)].
> 
> 


Reply via email to