<div dir="ltr">Marcel,<br><br>Thanks for your reply.<br><br>I don't know why it is so difficult for me to grock (does anyone say that anymore?) this stuff, however your answer does not clarify my understanding:-( I will attempt to use #on:send:to::in my solution, however, I would appreciate a Workspace example of #on:send:to:withValue to satisfy my curiosity. I will write something in the wiki for future reference once I understand it :-)<br><br>Cheers,<br>jrm<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 11, 2018 at 6:33 AM, Marcel Taeumel <span dir="ltr"><<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id="m_-3192287525604753972__MailbirdStyleContent" style="font-size:12pt;font-family:calibri;color:#000000">
                                        
                                        
                                            
                                        
                                        
                                        Hi, there. :)<div><br></div><div>Well, #on:send:to: works best if the target's source code is under your control. In your example, you would implement something like #setContentsEvent:from: in MyTextMorph. There, you have access to the mouse event and to the source morph to access the contents.</div><div><br></div><div>I would like to explain two other things, too:</div><div>1) You only need to call #addDependent: in the source if you want to implement or use #update: in the target. That's not the case in your example. You do not need it here.</div><div>2) The way #on:send:to:withValue: works is, in my opinion, broken. It only supports you to configure a single, hard-coded value, to be passed as first argument in a three-arg-selector. This is useless if you think about having multiple callbacks configured via #on:send:to:withValue:. We should fix that in the future.</div><div><br></div><div>Best,</div><div>Marcel</div><div class="m_-3192287525604753972mb_sig"></div>
                                        
                                        <blockquote class="m_-3192287525604753972history_container" type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px;min-width:500px">
                        <p style="color:#aaaaaa;margin-top:10px">Am 11.01.2018 03:33:27 schrieb John-Reed Maffeo <<a href="mailto:jrmaffeo@gmail.com" target="_blank">jrmaffeo@gmail.com</a>>:</p>______________________________<wbr>_________________
Beginners mailing list
<a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.<wbr>squeakfoundation.org</a>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.<wbr>org/mailman/listinfo/beginners</a><div><div class="h5">
<div dir="ltr"><div>#EventHandler halts with this warning from the method #on:send:to:withValue:</div><div><br></div>How does this work? I can't find an example.<div><br></div><div>I am trying to learn how to use TextMorph in an application. My simple test case is a morph containing two TextMorphs. I want the second morph to contain the contents of the first morph when that morph loses focus.</div><div><br></div><div>start -------------------</div><div><div>|borMor tMor1 tMor2 |</div><div><br></div><div>borMor := BorderedMorph new.</div><div>borMor color: Color white.</div><div>borMor width: 44.</div><div>tMor1 := TextMorph new.</div><div>tMor1 contents: 'Hello World!'.</div><div>tMor2 := TextMorph new.</div><div>tMor2 contents: '?????'.</div><div>tMor1 addDependent: tMor2.</div><div><br></div><div>borMor  layoutPolicy: TableLayout new;</div><div><span style="white-space:pre-wrap">   </span> listDirection: #leftToRight;</div><div><span style="white-space:pre-wrap">    </span> wrapCentering: #topLeft;</div><div><span style="white-space:pre-wrap">        </span> hResizing: #spaceFill;</div><div><span style="white-space:pre-wrap">  </span> vResizing: #spaceFill;</div><div><span style="white-space:pre-wrap">  </span> layoutInset: 2;</div><div><span style="white-space:pre-wrap"> </span> rubberBandCells: true.</div><div><br></div><div>borMor addMorph: tMor1. </div><div>tMor1 addDependent: tMor2.</div><div>borMor addMorph: tMor2.<span style="white-space:pre-wrap"> </span></div><div>tMor1 on: #mouseLeave send: #contents: to: tMore2 withValue: #(tMor1 contents nil).<span style="white-space:pre-wrap">      </span></div><div><br></div><div><br></div><div>borMor openInWorld.</div><div><br></div><div>end -----------------</div><div><br></div><div>This may not be the best way to approach the problem, but I would like to know how to use the method in any case.</div><div><br></div><div>Thanks,</div><div><br></div><div>jrm</div><div><br></div><div><br></div></div></div>

                        </div></div></blockquote></div><br>______________________________<wbr>_________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.<wbr>squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://lists.squeakfoundation.<wbr>org/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div></div>