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