Thank you Stephan! There is my exercise: âwhen:send:to" morph := 'Hello' asMorph. morph when: #click send: #traceCr: to: morph. morph openInWindow. â> it does not work for me. I do not know what the announcement should be "Handler" morph := 'Hello' asMorph. morph eventHandler: MorphicEventHandler new. morph eventHandler on: #click send: #traceCr: to: morph. morph openInWindow. â> It works and there are examples in MorphicEventHandlerTest Thanks!
El 02-02-2018, a las 03:43, Stephan Eggermont <stephan@stack.nl> escribió:
Juraj Kubelka <juraj.kubelka@icloud.com> wrote:
Letâs say that we have a StringMorph: âHello' asMorph. Can I attach a MenuMorph (or a menu building logic) and display the context menu on a mouse click in the StringMorph?
Or the only way to do it is to subclass the StringMorph and write the logic in the #mouseDown: method?
#when:send:to:, or replace the eventhandler, or subclass
Stephan