Antwort: Re: Antwort: Re: Antwort: Re: [Newbies] closing/deleting a
morph and dependents
Dietmar.Schielke at data-experts.de
Tue Jun 5 14:33:36 UTC 2007
tx for the code snipets.
I figured something out by my self :-)
1. When a Morph is removed from the world
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.
beginners-bounces at lists.squeakfoundation.org schrieb am 05.06.2007
> El 6/5/07 9:20 AM, "Dietmar Schielke" <Dietmar.Schielke at data-experts.de>
> > 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
> > before setting a new connection?
> > Further, then I delete a SwitchMorph maybe it should also disconnect
> > its's connections?
> At the time I have
> 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.
> color: (menu color alpha: 0.3).
> 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.
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners