Your original code seems ok.

Try the following via inspecting the PluggableTextMorph of a Workspace, for 
example (changed to do mouse down...)

| mouseDown morph |
morph := self scroller submorphs first.
mouseDown := MouseButtonEvent basicNew
setType: #mouseDown
position: (morph bounds origin + (1...@1))
which: 4
buttons: 7
hand: (HandMorph new mouseFocus: morph; yourself)
stamp: Time millisecondClockValue.
morph handleMouseDown: mouseDown.

Regards, Gary

----- Original Message ----- 
From: "Tudor Girba" <[email protected]>
To: <[email protected]>
Sent: Monday, November 16, 2009 1:21 PM
Subject: Re: [Pharo-project] simulating morphic events


> Interesting, but I am also looking for a mouse event. Anyone has other
> examples?
>
> Doru
>
>
> On 16 Nov 2009, at 13:57, Lukas Renggli wrote:
>
>>> At this moment it looks like the problem is that the eventHandler in
>>> the morph is nil. Can anyone point me into the right direction?
>>
>> Have a look at OBKeyBindingsTest>>modifier:keycode: in OB-Morphic-
>> Tests.
>>
>> Lukas
>>
>> -- 
>> Lukas Renggli
>> http://www.lukas-renggli.ch
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [email protected]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> --
> www.tudorgirba.com
>
> "Some battles are better lost than fought."
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project 


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to