<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 6/13/2024 5:02 PM, Mark Volkmann via Cuis-dev wrote:
<blockquote
cite="mid:CAFfRWnXWtddzMEANUt8Dy9Lh7GoM=wCLT_w_77_Pj-gyD+Abxg@mail.gmail.com"
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 class="gmail-Apple-converted-space"> </span>opens
displays my name. I can type into it. But it does not
change the value of the<span
class="gmail-Apple-converted-space"> </span></font><font
face="monospace">author</font><font face="arial,
sans-serif"><span class="gmail-Apple-converted-space"> </span>instance
variable<span class="gmail-Apple-converted-space"> </span></font><font
face="arial, sans-serif">in<span
class="gmail-Apple-converted-space"> </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"
data-smartmail="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>
<br>
Cheers,<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
</body>
</html>