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 <step...@stack.nl> escribió:
> 
> Juraj Kubelka <juraj.kube...@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
> 
> 
> 


Reply via email to