<div dir="ltr"><div>Here is another suggestion: <br></div><div><br></div><div>Morph>>delete</div> "Remove the receiver as a submorph of its owner and make its <br>    new owner be nil."<br>       | oldWorld |<br>  self removeHalo.<br>      self isFlexed ifTrue:[self removeFlexShell]. <br> (oldWorld := self world) ifNotNil: [<br>          self disableSubmorphFocusForHand: self activeHand.<br>            self activeHand<br>                      releaseKeyboardFocus: self;<br>                   releaseMouseFocus: self].<br>     owner ifNotNil: [<br>             self privateDelete. "remove from world"<br>             self player ifNotNil: [:player |<br>                      oldWorld ifNotNil: [<br><div>                               player noteDeletionOf: self fromWorld: oldWorld]]].</div><div><br></div><div>Best,</div><div>Karl<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 24, 2019 at 9:21 AM Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de">marcel.taeumel@hpi.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div id="gmail-m_54452701301215286__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0)">
                                        <div>-1 for adding such a side effect to Morph >> #privateDelete.</div><div><br></div>What about adding TransformMorph >> #removedMorph: and checking for "self owner = self world"?<div><br></div><div>Best,</div><div>Marcel</div><div></div><blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px">
                        <p style="color:rgb(170,170,170);margin-top:10px">Am 23.09.2019 22:16:59 schrieb karl ramberg <<a href="mailto:karlramberg@gmail.com" target="_blank">karlramberg@gmail.com</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<div dir="ltr"><div>PS: I have made work around for this issue before in these places:</div><div><br></div><div>FlapTab privateDeleteReferent<br>MenuMorph delete<br>SystemWindow delete</div><div><br></div><div>Best,</div><div>Karl<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 23, 2019 at 10:02 PM karl ramberg <<a href="mailto:karlramberg@gmail.com" target="_blank">karlramberg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I'm not sure if this is the right way to delete a flexed morph.</div><div>Somebody with a better understanding than me must check if this is the right way to do this.</div><div>Here is a test that leaves a green TransformationMorph before this change:</div><div> 
<a href="http://source.squeak.org/inbox/Morphic-kfr.1540.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/Morphic-kfr.1540.mcz</a>

</div><div><br></div><div>rect := RectangleMorph new openInWorld.<br>rect heading: 45.0.<br>rect delete.</div><div><br></div><div>Best,</div><div>Karl.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 23, 2019 at 9:52 PM <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">A new version of Morphic was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Morphic-kfr.1540.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/Morphic-kfr.1540.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-kfr.1540<br>
Author: kfr<br>
Time: 23 September 2019, 9:52:14.252115 pm<br>
UUID: 19e57221-4088-0f49-9549-22e1270e933b<br>
Ancestors: Morphic-mt.1539<br>
<br>
If a morph is flexed, it's owner must be deleted<br>
<br>
=============== Diff against Morphic-mt.1539 ===============<br>
<br>
Item was changed:<br>
  ----- Method: Morph>>privateDelete (in category 'submorphs-add/remove') -----<br>
  privateDelete<br>
        "Remove the receiver as a submorph of its owner"<br>
+       self isFlexed ifTrue:[^owner delete].<br>
        owner ifNotNil:[owner removeMorph: self].!<br>
<br>
<br>
</blockquote></div>
</blockquote></div>
</div></blockquote>
                                        </div></div><br>
</blockquote></div>