<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><font size="4">What you want is the TextModelMorph (this name is
extremely confusing) to accept content on any key in:</font></p>
<p><font size="4"> text := 'initial value'.<br>
textModel := TextModelMorph textProvider: self textGetter:
#text textSetter: #text: ::<br>
acceptOnAny: true.</font></p>
<p><font size="4">The model (self here) will be notified by the
#text: message of any change. You don't need to set dependency
there.</font></p>
<p><font size="4">In the other hand, when the model is changed with
#text: here the dependendy takes place, the Model inform any one
listening there are some changes:</font></p>
<p><font size="4">text: aString<br>
text := aString asString copy.<br>
self changed: #text.<br>
self changed: #clearUserEdits.<br>
self changed: #relabel "Same as self triggerEvent: #relabel"<br>
</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">Regarding name, TextModelMoprh should be
understood as a TextMorph, after all it is a view. It brings
confusion to the user, particularly regarding dependency.
TextModel is for internal use, and its name may confuse you. You
should not care about it.<br>
</font></p>
<p><font size="4">Your Model object is the one holding your data,
for example an Person object with attribute as firstName,
famillyName.<br>
</font></p>
<p><font size="4">In the decoupled paradigm of MVC or MVP, TextMorph
is the view, hooked to a model. When there are changed in the
TextMorph it<br>
</font></p>
<p><font size="4">Take a look to your example I edited.</font></p>
<p><font size="4">Hilaire<br>
</font></p>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://mamot.fr/@drgeo">http://mamot.fr/@drgeo</a></pre>
</body>
</html>