<br><font size=2 face="sans-serif">Hi Edgar,</font>
<br>
<br><font size=2 face="sans-serif">thanks for your answer :-)</font>
<br><font size=2 face="sans-serif">I will have to describe it better.</font>
<br>
<br><font size=2 face="sans-serif">Yes my morph and its submorphs disappear
correctly when I close/delete it.</font>
<br>
<br><font size=2 face="sans-serif">My problem is, that the submorphs need
to do some clean up (unregister as dependents from the domain objects)
&nbsp;when they disapear from the world . I tried to overwrite delete in
my submorphs, but delete was not called on my submorphs when i closed/deleted
my GUI.</font>
<br>
<br><font size=2 face="sans-serif">Here is a short sketch of my classes:</font>
<br>
<br><font size=2 face="sans-serif">I have a class Device (with attributes
name, ip-Adress, port) which holds subdevices (objects of class Subdevice
with attributes like name, description, state..)</font>
<br>
<br><font size=2 face="sans-serif">To view and edit Devices with their
subdevices i made a DeviceMorph (for viewing/editing the &quot;primitive&quot;
attributes of Device) and a SubdeviceMorph (for the SubDevices). Devicemorphs
hold Subdevicemorphs as submorphs. Subdevicemorphs register themself as
dependent on an Subdevice object so they get infomed when the &nbsp;Subdevice
changes it's state (just the squeak standard change notification mechanics).
This works fine. I can open several DeviceMorphs for the same Device and
a change on the device or its subdevices via one of the openDevice Morphs
ist instantly displayed on all open DeviceMorphs for that device.</font>
<br>
<br><font size=2 face="sans-serif">When i close one of the DeviceMorphs
observing my Device i need to unregister its SubDeviceMorphs from the SubDivices
they have observed, because they are no longer visible and do not need
the change notifications of their SubDevice anymore and because the reference
from my SubDevice to my (now unvisible) SubDeviceMorph prevents the SubDeviceMorph
from being garbage collected.</font>
<br>
<br><font size=2 face="sans-serif">Btw. I copied this design from the morphic
counter example on http://wiki.squeak.org/squeak/795. The difference between
the counter example an my problem is, that my domain objects live more
independent of the GUI.</font>
<br>
<br><font size=2 face="sans-serif">I have seen that morphs can have a model,
but i have no idea how to use it.</font>
<br>
<br><font size=2 face="sans-serif">Thanks again,</font>
<br>
<br><font size=2 face="sans-serif">Dietmar</font>
<br>
<br><font size=2 face="sans-serif">Edgar schrieb:</font>
<br><tt><font size=2>&gt;El 6/5/07 4:24 AM, &quot;Dietmar Schielke&quot;
&lt;Dietmar.Schielke@data-experts.de&gt;<br>
&gt;escribió:<br>
&gt;<br>
&gt;&gt; <br>
&gt;&gt; Hi Squeakers, <br>
&gt;&gt; <br>
&gt;&gt; i made a simple morph with submorphs. the submorphs are views
for some domain<br>
&gt;&gt; objects and are dependents of them ( domainobj addDependent: mysubmorph
).<br>
&gt;&gt; Every thing works fine :-)<br>
&gt;&gt; but i can't figure out, how to remove my submorphs from the dependents
list of<br>
&gt;&gt; my domain object, when I close/delete my morphic gui.<br>
&gt;&gt; It seems Morph delete does not call delete recursively on its
submorphs. Is<br>
&gt;&gt; there an other way submorphs get informed when they are removed
from the<br>
&gt;&gt; screen? <br>
&gt;&gt; <br>
&gt;&gt; Thanks in advance,<br>
&gt;&gt; <br>
&gt;&gt; Dietmar <br>
&gt;<br>
&gt;Could send sample ?<br>
&gt;Morph could be viewed as &quot;containers&quot; of all submorphs inside
.<br>
&gt;As example any Tools is a SystemWindow and a model for it.<br>
&gt;Select a Browser as example and you could see have many submorphs.<br>
&gt;Deleting the window , delete all submorphs inside.<br>
&gt;<br>
&gt;Or I misunderstanding you ?<br>
&gt;<br>
&gt;Edgar<br>
</font></tt>