<!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">Hi, <br>
      </font></p>
    <p><font size="4">For the Art of Morph book, I have this example
        where StringRequestMorph is extended as a FileRequesstMorph. The
        user can optionally selects a file from the file selector panel
        below:</font></p>
    <p><img moz-do-not-send="false"
        src="cid:part1.xS0CmnYb.Uqq9Np9o@free.fr" alt="" width="411"
        height="193"></p>
    <p><br>
    </p>
    <p>When a file is selected, its path is set on the TextModelMorph
      above. However to get the #response event to be properly handled
      and the text model morph entry updated, I have to toggle the
      hasUnacceptedEdits attribute, this is obscure. <br>
    </p>
    <pre>entry: anEntry
    textMorph hasUnacceptedEdits: false.
    response := anEntry asString.
    self changed: #response.
    textMorph hasUnacceptedEdits: true.</pre>
    <p>Any explanation?<br>
    </p>
    Thanks<br>
    <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>