<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1466923778049_5135"><span id="yui_3_16_0_ym19_1_1466923778049_5287">I just used MenuViewers.Copy (unchanged) from Original Oberon:</span></div><div id="yui_3_16_0_ym19_1_1466923778049_5135"><span><br></span></div><div id="yui_3_16_0_ym19_1_1466923778049_5203">  PROCEDURE Copy (V: Viewer; VAR V1: Viewer);</div><div id="yui_3_16_0_ym19_1_1466923778049_5204">    VAR Menu, Main: Viewers.Viewer; M: Viewers.CopyMsg;</div><div id="yui_3_16_0_ym19_1_1466923778049_5205">  BEGIN Menu := V.dsc; Main := V.dsc.next;</div><div id="yui_3_16_0_ym19_1_1466923778049_5206">    NEW(V1); V1^ := V^; V1.state := 0;</div><div id="yui_3_16_0_ym19_1_1466923778049_5207">    M.V := NIL; Menu.handle(Menu, M); V1.dsc := M.V;</div><div id="yui_3_16_0_ym19_1_1466923778049_5208">    M.V := NIL; Main.handle(Main, M); V1.dsc.next := M.V;</div><div id="yui_3_16_0_ym19_1_1466923778049_5209">    V1.dsc.next.next := NIL; V1.dsc.parent := V1; V1.dsc.next.parent := V1; V1.parent := NIL</div><div id="yui_3_16_0_ym19_1_1466923778049_5135"></div><div id="yui_3_16_0_ym19_1_1466923778049_5210">  END Copy;</div><div id="yui_3_16_0_ym19_1_1466923778049_5210"><br></div><div id="yui_3_16_0_ym19_1_1466923778049_5210" dir="ltr">The two sub frames V1.dsc and V1.dsc.next are copied as well , which is what Original Oberon calls a deep copy. But in the case of TextFrames the respective texts F.text point to the same text as the sub frames of the original viewer (see TextFrames.Copy for the details).</div><div id="yui_3_16_0_ym19_1_1466923778049_5210" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1466923778049_5210" dir="ltr">If one attached the *original* descendants to the copy of the composite object, then how could their X, Y, W, W be different? Wouldn't that require a change in the frame's definition (making X, Y, W, Y part of an extended object or something)? I didn't want to go that far. But happy to consider if I see how it's done elsewhere and what the benefits are.</div><div id="yui_3_16_0_ym19_1_1466923778049_5210" dir="ltr"><br></div><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1466923778049_5180" style="display: block;">  <div style="font-family: HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;" id="yui_3_16_0_ym19_1_1466923778049_5179"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1466923778049_5178"> <div dir="ltr" id="yui_3_16_0_ym19_1_1466923778049_5177"> <font size="2" face="Arial" id="yui_3_16_0_ym19_1_1466923778049_5181"> <hr size="1" id="yui_3_16_0_ym19_1_1466923778049_5366"> <b id="yui_3_16_0_ym19_1_1466923778049_5359"><span style="font-weight:bold;" id="yui_3_16_0_ym19_1_1466923778049_5358">From:</span></b> Douglas G. Danforth <danforth@greenwoodfarm.com><br> <b id="yui_3_16_0_ym19_1_1466923778049_5361"><span style="font-weight: bold;" id="yui_3_16_0_ym19_1_1466923778049_5360">To:</span></b> Andreas Pirklbauer <andreas_pirklbauer@yahoo.com> <br> <b id="yui_3_16_0_ym19_1_1466923778049_5363"><span style="font-weight: bold;" id="yui_3_16_0_ym19_1_1466923778049_5362">Sent:</span></b> Sunday, June 26, 2016 1:47 AM<br> <b id="yui_3_16_0_ym19_1_1466923778049_5365"><span style="font-weight: bold;" id="yui_3_16_0_ym19_1_1466923778049_5364">Subject:</span></b> Re: [Oberon] I have been defeated.<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1466923778049_5223"><br><div id="yiv1058823978"><div id="yui_3_16_0_ym19_1_1466923778049_5234">
    "If a shallow copy would be desired, the descendants would not have
    to be copied, and the original descendants instead of their copies
    would be attached to the copy of the composite object."<br clear="none">
    <br clear="none">
    That is the behavior you want.  An editor (writer) that changes the
    state of an object must operate on only one object.  The viewers
    (readers) of the object see the same state change.<br clear="none">
    <br clear="none">
    If you did a deep copy then there would be two objects.  An edit of
    object 1 would not be seen by a viewer of object 2.<br clear="none">
    -Doug Danforth<br clear="none">
    <br clear="none">
    <div class="yiv1058823978yqt8855118205" id="yiv1058823978yqtfd86318"><div class="yiv1058823978moz-cite-prefix">On 6/25/2016 3:23 PM, Andreas
      Pirklbauer wrote:<br clear="none">
    </div>
    <blockquote type="cite">
      <div id="yiv1058823978yui_3_16_0_ym19_1_1466892844741_3648"><span id="yiv1058823978yui_3_16_0_ym19_1_1466892844741_3647">Douglas,</span></div>
      <div id="yiv1058823978yui_3_16_0_ym19_1_1466892844741_3646"><span><br clear="none">
        </span></div>
      <div dir="ltr" id="yiv1058823978yui_3_16_0_ym19_1_1466892844741_3645"><span id="yiv1058823978yui_3_16_0_ym19_1_1466892844741_3644">In Experimental
          Oberon, the changes to the original are *also* seen in a clone
          created by System.Clone. In fact, its copy behaviour is
          exactly the same as System.Copy, except that the copy is
          created in a separate virtual logical display area. I'm not so
          familiar with Blackbox, but </span>I used the term "deep" as
        it it used in the Project Oberon book section 4.4.2 (referring
        to the way descendants of a composite object are copied):</div>
      <div dir="ltr" id="yiv1058823978yui_3_16_0_ym19_1_1466892844741_3653"><span><br clear="none">
        </span></div>
      <div dir="ltr" id="yiv1058823978yui_3_16_0_ym19_1_1466892844741_3653"><span id="yiv1058823978yui_3_16_0_ym19_1_1466892844741_3706">"</span>As a fine
        point we clarify that the above algorithm is designed to create
        a deep copy of a composite object (a menu viewer in our case).
        If a shallow copy would be desired, the descendants would not
        have to be copied, and the original descendants instead of their
        copies would be attached to the copy of the composite object."</div>
      <div dir="ltr" id="yiv1058823978yui_3_16_0_ym19_1_1466892844741_3653"><br clear="none">
      </div>
      <div dir="ltr" id="yiv1058823978yui_3_16_0_ym19_1_1466892844741_3653">It's just
        semantics..</div>
      <div dir="ltr" id="yiv1058823978yui_3_16_0_ym19_1_1466892844741_3653">Andreas</div>
      <div class="yiv1058823978qtdSeparateBR" id="yiv1058823978yui_3_16_0_ym19_1_1466892844741_3557"><br clear="none">
      </div>
    </blockquote>
    <br clear="none">
  </div></div></div><br><br></div> </div> </div>  </div></div></body></html>