[Morphic] About worlds

Daniel Vainsencher danielv at netvision.net.il
Sat Aug 16 17:38:08 UTC 2003


Andreas Raab <andreas.raab at gmx.de> wrote:
> Hi,
> 
> > Andreas Raab <andreas.raab at gmx.de> wrote: 
> > I understand the problem, but you're implicit about the solution - do
> > you mean that instead of todays remove we would change the 
> > Morphs parent to be the world?
> 
> No, what I'm saying is that the "owner" relationship should not be affected
> at all when you "remove" a morph.
Ah. It seems to me though we can keep the invariant you describe below
(isParent(A,B) iff isSubmorph(B,A)) and still solve the problem. What do
you think about fixing the issue the way I propose - every Morph always
starts out with a parent (AstralWorld? WombWorld?), and can only change
parents, but never remains orphaned. AFAICT, this would not change many
implementation issues, but would require eventually changing the
interfaces so that the remove would be replaced with #reParentTo: or
something like it.

> Secondly, there is a significant problem when creating new morphs. These
> days, new morphs are not initialized in a definitive context (e.g., when
> they are created their owner is nil) and one would need to provide
> appropriate initializations. Most places don't care about this at all and I
> would suspect that we'd get into serious trouble if we started relying on
> all morphs being properly initialized ("properly" as in: having a definite
> link to some world unless destroyed).

How much more complex is it than adding owner _ WombWorld to
Morph>>initialize? seems to make things simpler in that stuff is always
initialized, except that initially it is to a world that isn't shown...

Anyway, regardless of what solution is chosen, it doesn't seem to me like 
something that's impossible to do in 3.7 or 3.8...

Ok, will pipe down and let the experts talk now...

Daniel



More information about the Squeak-dev mailing list