<div id="__MailbirdStyleContent" style="font-size: 12pt;font-family: calibri;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        Hi, there.<div><br></div><div>Those orange triangles indicate unsaved changes. That is, your widgets have state different to your model. In Squeak's text fields you can hit [CMD]+[S] or sometimes only [Enter] to accept the changes and write it back to the model.</div><div><br></div><div>In such ToolBuilder applications, you have two kinds of control flow:</div><div>1) Widget -> Model</div><div>Configured in your #buildWith: method, you tell the widgets about the model interface. The widget stores references to the model and the callbacks (e.g. #checkMail:). The widgets decide when to call the model. See your #buildWith: and look for #setText:, #getText:, #editText:.</div><div>2) Model -> Widget</div><div>Configured also in your #buildWith: method. However, models can be shared among multiple widgets. That's why you have to use #changed: to notify all widgets about modifications. Conveniently, the messages you tell the widget via #getText: matches your #changed: call. So, you just tell the environment: "Hey, anybody out there that uses #foobar to retrieve text contents? Do it again, you will get new stuff."</div><div><br></div><div>If you find some widget interactions annoying (such as [CMD]+[S]), look for widget configuration. In this case, take a look at PluggableTextSpec. You will find things like #askBeforeDiscardingEdits or #softLineWrap or #indicateUnacceptedChanges.</div><div><br></div><div>Anyway, PluggableTextSpec needs you to hit [CMD]+[S], PluggableInputFieldSpec just expects [Enter]. You can only bypass that via #editText:, which fires after (almost) any keyboard input.</div><div><br></div><div>Best,</div><div>Marcel</div><div><br></div><div class="mb_sig"></div>
                                        
                                        <blockquote class="history_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 25.01.2018 03:44:11 schrieb John-Reed Maffeo <jrmaffeo@gmail.com>:</p>_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr">Marcel, I have been working with the change set you provided and I am not getting the same results you show in your mail (see attached).<div><br></div><div>If I make changes to name and date, those changes do not appear in the Note pane either.</div><div><br></div><div>The email field value is the only one which propagates to the note, because, I think, the method #checkMail: contains an invocation of #mail: which invokes #changed:. I don't see in the code where any of the other setters ( for username, message password, or date) are invoked.</div><div><br></div><div>The #accept method only displays the current values of the instance variables. I don't know where I should put the code which would invoke the setters. If the code you sent me is different than the code you used to create your screen shot, please send it along, that will probably help me understand.</div><div><br></div><div>Thanks again for your help,</div><div><br></div><div>jrm</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 16, 2018 at 5:22 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;min-width: 500px"><div id="m_5531359216957633064__MailbirdStyleContent" style="font-size: 12pt;font-family: calibri;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        Hi, there.<div><br></div><div>Try using the Tool Builder for that. Take a look at the change set attached to this mail.</div><div><br></div><div><img src="cid:e3bd944e-7a5d-41ee-a95f-fab605c76c2c" width="auto"></img></div><div><br></div><div>Best,</div><div>Marcel</div><div><div class="h5"><div class="m_5531359216957633064mb_sig"></div>
                                        
                                        <blockquote class="m_5531359216957633064history_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 15.01.2018 18:54:49 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 dir="ltr">Marcel, Thanks!<div><br></div><div>Your example is very helpful. I think I can build on this :-)</div><div><br></div><div>It makes me think that  it would be reasonable to implement a variety of sub-classes of #textMorph for different data objects within my Business Model. By this I mean that I would have a DateTextMorp which would only allow valid dates or IntegerTextMorph which would only accept integer values or ProductNumberTextMorph which would only accept valid numbers from a dictionary of product numbers?</div><div><br></div><div>Cheers,</div><div><br></div><div>jrm</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 12, 2018 at 6:05 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;min-width: 500px"><div id="m_5531359216957633064m_4288510756047845664__MailbirdStyleContent" style="font-size: 12pt;font-family: calibri;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        Hi, there.<div><br></div><div>Sorry for my apparently confusing explanation. :-)</div><div><br></div><div>Please find a attached a change set to file-in via drag-drop into your image. It contains the class MyTextMorph. Then you can try out the following code in your workspace:</div><div><br></div><div><div>| container fieldOne fieldTwo |</div><div><br></div><div>container := Morph new.</div><div>fieldOne := MyTextMorph new.</div><div>fieldTwo := MyTextMorph new.</div><div><br></div><div>container</div><div><span class="m_5531359216957633064m_4288510756047845664Apple-tab-span" style="white-space:pre-wrap">        </span>color: Color white;</div><div><span class="m_5531359216957633064m_4288510756047845664Apple-tab-span" style="white-space:pre-wrap">   </span>extent: 400@100;</div><div><span class="m_5531359216957633064m_4288510756047845664Apple-tab-span" style="white-space:pre-wrap">      </span>layoutPolicy: TableLayout new;</div><div><span class="m_5531359216957633064m_4288510756047845664Apple-tab-span" style="white-space:pre-wrap">        </span>layoutInset: 2;</div><div><span class="m_5531359216957633064m_4288510756047845664Apple-tab-span" style="white-space:pre-wrap">       </span>listDirection: #leftToRight.</div><div><br></div><div>fieldOne</div><div><span class="m_5531359216957633064m_4288510756047845664Apple-tab-span" style="white-space:pre-wrap">  </span>hResizing: #spaceFill;</div><div><span class="m_5531359216957633064m_4288510756047845664Apple-tab-span" style="white-space:pre-wrap">        </span>vResizing: #spaceFill.</div><div><br></div><div>fieldTwo</div><div><span class="m_5531359216957633064m_4288510756047845664Apple-tab-span" style="white-space:pre-wrap">        </span>hResizing: #spaceFill;</div><div><span class="m_5531359216957633064m_4288510756047845664Apple-tab-span" style="white-space:pre-wrap">        </span>vResizing: #spaceFill.</div><div><br></div><div>fieldOne contents: 'Hello World!'.</div><div>fieldTwo contents: '?????'.</div><div><br></div><div>container</div><div><span class="m_5531359216957633064m_4288510756047845664Apple-tab-span" style="white-space:pre-wrap">   </span>addMorphBack: fieldOne;</div><div><span class="m_5531359216957633064m_4288510756047845664Apple-tab-span" style="white-space:pre-wrap">       </span>addMorphBack: fieldTwo.</div><div><br></div><div>fieldOne addDependent: fieldTwo.</div><div><br></div><div>container openInWorld.</div></div><div><br></div><div>-----</div><div><br></div><div>Note that TextMorph has actually NO support for #on:send:to: at the moment bc. it overrides various methods that ignore EventHandler. You have to implement #handlesMouseOver:, #mouseLeave, and #update:with:. See the attached changeset.</div><div><br></div><div>Best,</div><div>Marcel</div><div><div class="m_5531359216957633064h5"><div class="m_5531359216957633064m_4288510756047845664mb_sig"></div>
                                        
                                        <blockquote class="m_5531359216957633064m_4288510756047845664history_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 12.01.2018 02:57:57 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.squeakfoundati<wbr>on.org</a>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.<wbr>org/mailman/listinfo/beginners</a>
<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;min-width: 500px"><div id="m_5531359216957633064m_4288510756047845664m_-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_5531359216957633064m_4288510756047845664m_-3192287525604753972mb_sig"></div>
                                        
                                        <blockquote class="m_5531359216957633064m_4288510756047845664m_-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.squeakfoundati<wbr>on.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="m_5531359216957633064m_4288510756047845664h5">
<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" target="_blank">Beginners@lists.squeakfoundati<wbr>on.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>

                        </blockquote></div></div></div><br>______________________________<wbr>_________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundati<wbr>on.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>

                        </blockquote></div></div></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>

                        </blockquote></div>