<div dir="ltr"><div dir="ltr">On Thu, Jun 13, 2024 at 3:17 PM Juan Vuletich <<a href="mailto:juan@cuis.st" target="_blank">juan@cuis.st</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><u></u>

  
    
  
  <div bgcolor="#ffffff">
    On 6/13/2024 5:02 PM, Mark Volkmann via Cuis-dev wrote:
    <blockquote type="cite">
      <div dir="ltr">Here's a simple example.
        <div><br>
          <div>
            <div><font face="monospace">VBook</font> is a class I
              created with instance variables <font face="monospace">author</font> and <font face="monospace">title</font>. It has the instance
              methods <font face="monospace">author</font>, <font face="monospace">author:</font>, <font face="monospace">title</font>,
              and <font face="monospace">title:</font>. Here are two of
              them that I generated by right-clicking the class in a
              System Browser and selecting "create inst var accessors".</div>
            <div><br>
            </div>
            <div>
              <div><font face="monospace">author<br>
                      ^ author<br>
                </font></div>
              <div><font face="monospace"><br>
                </font></div>
              <div><font face="monospace">author: anObject<br>
                      author := anObject</font><br>
              </div>
            </div>
            <br>
          </div>
          <div>I ran this code in a Workspace:</div>
          <div><br>
          </div>
          <div><font face="monospace">book := VBook new author: 'R. Mark
              Volkmann'; title: 'htmx'.<br>
              tm := TextModelMorph</font></div>
          <div><font face="monospace">    textProvider: book</font></div>
          <div><font face="monospace">    textGetter: #author</font></div>
          <div><font face="monospace">    textSetter: #author.<br>
              tm openInWorld</font></div>
          <div><font face="monospace"><br>
            </font></div>
          <div><font face="arial, sans-serif">The </font><font face="monospace">TextModelMorph</font><font face="arial,
              sans-serif"><span> </span>opens
              displays my name. I can type into it. But it does not
              change the value of the<span> </span></font><font face="monospace">author</font><font face="arial,
              sans-serif"><span> </span>instance
              variable<span> </span></font><font face="arial, sans-serif">in<span> </span></font><font face="monospace">boo</font><font face="arial, sans-serif">k.
              Isn't it supposed to do that?</font></div>
        </div>
        <div><br>
        </div>
        <span class="gmail_signature_prefix">-- </span><br>
        <div dir="ltr" class="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div dir="ltr">
                      <div><font face="arial, helvetica, sans-serif">R.
                          Mark Volkmann</font></div>
                      <div><span style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Object
                            Computing, Inc.</font></span></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    You were close. Spot the differences with:<br>
    <br>
    book := VBook new author: 'R. Mark Volkmann'; title: 'htmx';
    yourself.<br>
    tm := TextModelMorph<br>
        textProvider: book<br>
        textGetter: #author<br>
        textSetter: #author:.<br>
    tm openInWorld<br></div></blockquote><div><br></div><div>Yes, I forgot the "yourself" part. Thanks for catching that. But it still doesn't work. I can change the value in the <font face="monospace">TextModelMorph</font> and the value of the <font face="monospace">author</font> instance variable in the <font face="monospace">book</font> object does not change.</div></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">R. Mark Volkmann</font></div><div><span style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Object Computing, Inc.</font></span></div></div></div></div></div></div></div></div></div>