[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ports and morphs
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@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