<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Le 01/07/2023 à 12:15, Hilaire
      Fernandes a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:4e017b63-0a37-8dad-e3ab-05ff2acf1e70@free.fr">
      <p>Is it the expected behavior?<br>
      </p>
    </blockquote>
    <p>I guess so. <br>
    </p>
    <p>I implemented my own variant to search, does not check circular
      reference though:</p>
    <div style="background: #ffffff;
      overflow:auto;width:auto;border:solid gray;border-width:.1em .1em
      .1em .8em;padding:.2em .6em;">
      <pre style="margin: 0; line-height: 125%"><span style="color: #0066BB; font-weight: bold">treePointsTo:</span> <span style="color: #996633">anObject</span>
<span style="color: #888888">" Are my instances and sub instances hold a reference of anObject"</span>
        <span style="color: #333333">^</span> (<span style="color: #007020">self</span> <span style="color: #0066BB; font-weight: bold">statePointsTo:</span> <span style="color: #996633">anObject</span>) <span style="color: #0066BB; font-weight: bold">or:</span> [ <span style="color: #333333">|</span><span style="color: #996633">attributesToVisit</span> <span style="color: #0066BB; font-weight: bold">|</span>
                <span style="color: #996633">attributesToVisit</span> <span style="color: #333333">:=</span> <span style="color: #BB0066; font-weight: bold">OrderedCollection</span> <span style="color: #007020">new</span>.
                <span style="color: #6600EE; font-weight: bold">1</span> <span style="color: #0066BB; font-weight: bold">to:</span> <span style="color: #007020">self</span> <span style="color: #0066BB; font-weight: bold">class</span> <span style="color: #0066BB; font-weight: bold">instSize</span> <span style="color: #0066BB; font-weight: bold">do:</span> [<span style="color: #333333">:</span><span style="color: #996633">i</span> <span style="color: #333333">|</span>
                        (<span style="color: #007020">self</span> <span style="color: #0066BB; font-weight: bold">instVarAt:</span> <span style="color: #996633">i</span>) <span style="color: #0066BB; font-weight: bold">isCollection</span> <span style="color: #007020">ifTrue:</span> [ <span style="color: #996633">attributesToVisit</span> <span style="color: #0066BB; font-weight: bold">addAll:</span> (<span style="color: #007020">self</span> <span style="color: #0066BB; font-weight: bold">instVarAt:</span> <span style="color: #996633">i</span>)] ].
                <span style="color: #996633">attributesToVisit</span> <span style="color: #0066BB; font-weight: bold">anySatisfy:</span> [<span style="color: #333333">:</span><span style="color: #996633">attribute</span> <span style="color: #333333">|</span> 
                        <span style="color: #996633">attribute</span> <span style="color: #0066BB; font-weight: bold">==</span> <span style="color: #996633">anObject</span> <span style="color: #0066BB; font-weight: bold">or:</span> [<span style="color: #996633">attribute</span> <span style="color: #0066BB; font-weight: bold">treePointsTo:</span> <span style="color: #996633">anObject</span>] ] ]
</pre>
    </div>
    <p><!-- HTML generated using hilite.me --></p>
    <pre class="moz-signature" cols="72">-- 
GNU Dr. Geo
<a class="moz-txt-link-freetext" href="http://drgeo.eu">http://drgeo.eu</a>
<a class="moz-txt-link-freetext" href="http://blog.drgeo.eu">http://blog.drgeo.eu</a></pre>
  </body>
</html>