Thanks Gary, Indeed, this raises the local menu. So maybe the morph I am testing has some problems.
But, if we are at it, I have a question regarding the mouse buttons. I thought that "which: 4" will raise a left click event (which is what I would like to target), but by running your code I get a menu popping out. What am I missing? Cheers, Doru On 16 Nov 2009, at 14:57, Gary Chambers wrote: > 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" <tudor.gi...@gmail.com> > To: <Pharo-project@lists.gforge.inria.fr> > 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 >>> Pharo-project@lists.gforge.inria.fr >>> 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 >> Pharo-project@lists.gforge.inria.fr >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > Pharo-project@lists.gforge.inria.fr > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project -- www.tudorgirba.com "Problem solving efficiency grows with the abstractness level of problem understanding." _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project