ports and morphs

Rainer Blome rainer at physik3.gwdg.de
Tue Jun 4 08:26:19 UTC 1996


Jecel wrote:

> The problem is how to be able to change the color of these
> two objects together but not that third one. I have an idea

Seems like the perfect opportunity for multiple inheritance,
doesn't it?  Put the shared properties in a `graphics parent':

(| group-props = (| color = a_paint.  origin = 10 at 20.  |).

   left-side = (| graphics-parent* = group-props.
   -- will not work, literals are evalled in lobby
   -- context, but you get the idea
		  parent* = traits foo_morph.
		  leftish stuff ... .
		  |).

   right-side = (| graphics-parent* = group-props.
		   parent* = traits bar_morph.
		   rightish stuff ... .
		   |).
   ... .
   |)

Anything wrong with this?

Rainer



More information about the Self-interest mailing list