<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>
> <br>
> <br>
> <br>
> El 6/5/07 9:20 AM, "Dietmar Schielke" <Dietmar.Schielke@data-experts.de><br>
> escribió:<br>
> <br>
> > <br>
> > Thank for your links. I'll try to dig further into it.<br>
> > <br>
> > A first look into SwitchMorph raises a first question in me:<br>
> > <br>
> > When you call addDependent: should'nt be there a corresponding<br>
> > removeDependent: in the code?<br>
> > <br>
> > Maybe connection: should first call removeDependent: for the
old connection<br>
> > before setting a new connection?<br>
> > Further, then I delete a SwitchMorph maybe it should also
disconnect from<br>
> > its's connections?<br>
> At the time I have <br>
> descablear<br>
> submorphs<br>
> do: [:each |<br>
> each isConnectionSet<br>
> ifTrue: [each
notifyRemoveMe].<br>
> each color: Color yellow]<br>
> <br>
> And I raise this with yellow click on the choosed Morph.<br>
> <br>
> here how to have your own colored menu !!!<br>
> <br>
> addMenuItemsTo: aMenu hand: aHandMorph<br>
> | menu |<br>
> menu := MenuMorph new.<br>
> menu color: Color blue.<br>
> menu<br>
> color: (menu color alpha: 0.3).<br>
> menu<br>
> add: 'descablear '<br>
> target: self<br>
> action: #descablear.<br>
> menu items<br>
> do: [:i | i color: Color yellow;<br>
> <br>
> font: (StrikeFont<br>
>
familyName: 'Comic Bold'<br>
>
size: 18<br>
>
emphasized: 1)].<br>
> menu invokeModal<br>
> <br>
> Maybe today I do all different ....<br>
> <br>
> As said, I have many different versions for you cook your own ideas.<br>
> <br>
> Edgar<br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> Beginners mailing list<br>
> Beginners@lists.squeakfoundation.org<br>
> http://lists.squeakfoundation.org/mailman/listinfo/beginners<br>
> <br>
</font></tt>