Okay, but i didn't find anything with globalToLocal. And i've find another solution,�just use soustraction for this problem :�
This is because, under rare circumstances, it is desirable to do
something in/on/to the desktop based on the position in the local
morph.
To get the local coordinates look for a method with the word "global"
in it -- globalToLocal: or something like that. �It's in Squeak, not
sure whether this is still in Pharo though.. �If anything, you could
always just subtract the upperleft coordinate of your window from the
MouseEvent's position..
On Wed, May 2, 2012 at 9:02 AM, Erwan Douaille <douailleerwan@gmail.com> wrote:
> Hi.
>
> I would like to know if it's possible to add a mouse handler on a specific
> morph ?
> I have a window and i would like to know the position of my mouse only in
> this window.
>
> For exemple i also use :
>
> self on: #mouseDown send: #captureMouse: to: self.
>
> But it give me the mouse position in pharo environment and not only in my
> window.
>
>
> Thanks :)
>
> --
> Douaille Erwan <douaille.erwan@gmail.com>