[Morphic] About worlds

Andreas Raab andreas.raab at gmx.de
Sat Aug 16 18:06:08 UTC 2003


> > 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.

I'm not sure if that AstralWorld would help too much here since typically,
we require a "valid world" if we need to refer to it (and the AstralWorld
wouldn't really be one). In this situation I would probably vote for the
(implicit) ActiveWorld rather than some pseudo-world. It seems likely that
this would be the better default here.

> 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.

There's not much that would have to be done here - all it would mean is that
sending #owner: would be a valid operation with the notion of removing the
morph from its previous owner and setting the new owner.

> 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...

I don't quite think so. This change would have tremendous implications on
lots and lots of the code and without being able to deal with the efficiency
issues during up-traversals you will find that Morphic can in fact be a
whole lot slower than it is today ;-)

Cheers,
  - andreas



More information about the Squeak-dev mailing list