<br><font size=2 face="sans-serif">Hi Edgar,</font>
<br>
<br><font size=2 face="sans-serif">tx for the code snipets.</font>
<br>
<br><font size=2 face="sans-serif">I figured something out by my self :-)</font>
<br>
<br><font size=2 face="sans-serif">1. When a Morph is removed from the
world </font>
<br><font size=2 face="sans-serif">outOfWorld: aWorld </font>
<br><font size=2 face="sans-serif">is called on the morph und recursive
an all its submorphs.</font>
<br><font size=2 face="sans-serif">So I can simply override outOfWorld:
in my SubDeviceMorphs.</font>
<br><font size=2 face="sans-serif">Im not shur if this is the correct way,
but it works.</font>
<br>
<br><font size=2 face="sans-serif">2. The dependents of an object are held
in an weak array so the cleanup i want is not realy neccesary.</font>
<br>
<br><font size=2 face="sans-serif">Dietmar</font>
<br>
<br><tt><font size=2>beginners-bounces@lists.squeakfoundation.org schrieb
am 05.06.2007 14:45:54:<br>
<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; El 6/5/07 9:20 AM, &quot;Dietmar Schielke&quot; &lt;Dietmar.Schielke@data-experts.de&gt;<br>
&gt; escribió:<br>
&gt; <br>
&gt; &gt; <br>
&gt; &gt; Thank for your links. I'll try to dig further into it.<br>
&gt; &gt; <br>
&gt; &gt; A first look into SwitchMorph raises a first question in me:<br>
&gt; &gt; <br>
&gt; &gt; When you call addDependent: should'nt be there a corresponding<br>
&gt; &gt; removeDependent: in the code?<br>
&gt; &gt; <br>
&gt; &gt; Maybe connection: should first call removeDependent: for the
old connection<br>
&gt; &gt; before setting a new connection?<br>
&gt; &gt; Further, then I delete a SwitchMorph maybe &nbsp;it should also
disconnect from<br>
&gt; &gt; its's connections?<br>
&gt; At the time I have <br>
&gt; descablear<br>
&gt; &nbsp; &nbsp; submorphs<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; do: [:each |<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; each isConnectionSet<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ifTrue: [each
notifyRemoveMe].<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; each color: Color yellow]<br>
&gt; <br>
&gt; And I raise this with yellow click on the choosed Morph.<br>
&gt; <br>
&gt; here how to have your own colored menu !!!<br>
&gt; <br>
&gt; addMenuItemsTo: aMenu hand: aHandMorph<br>
&gt; &nbsp; &nbsp; | menu |<br>
&gt; &nbsp; &nbsp; menu := MenuMorph new.<br>
&gt; &nbsp; &nbsp; menu color: Color blue.<br>
&gt; &nbsp; &nbsp; menu<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; color: (menu color alpha: 0.3).<br>
&gt; &nbsp; &nbsp; menu<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; add: 'descablear '<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; target: self<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; action: #descablear.<br>
&gt; &nbsp; &nbsp; menu items<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; do: [:i | i color: Color yellow;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font: (StrikeFont<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; familyName: 'Comic Bold'<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; size: 18<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; emphasized: 1)].<br>
&gt; &nbsp; &nbsp; menu invokeModal<br>
&gt; <br>
&gt; Maybe today I do all different ....<br>
&gt; <br>
&gt; As said, I have many different versions for you cook your own ideas.<br>
&gt; <br>
&gt; Edgar<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; _______________________________________________<br>
&gt; Beginners mailing list<br>
&gt; Beginners@lists.squeakfoundation.org<br>
&gt; http://lists.squeakfoundation.org/mailman/listinfo/beginners<br>
&gt; <br>
</font></tt>