Morphs as composition of traits?

Bert Freudenberg bert at freudenbergs.de
Sat Feb 9 21:02:44 UTC 2008


On Feb 9, 2008, at 6:52 , Igor Stasenko wrote:

> it's really hard to tell what properties morphs can be kept as basic 
> (core) ones.
> Dimenstions(shape)? No. There is morphs which never show-up on screen
> and therefore don't need any dimension/shape info.
> Visual aspects? Again - no. Depending on morph, they can be very
> different, including colors, borders or font style for text.
>
> So, maybe, i thought, better to think of morph as composition of
> different traits, which in sum defining an original morph.

Tweak does something similar, its graphical objects are composed of  
"aspects", for example "fill", "border", "geometry" etc.:

http://tweakproject.org/TECHNOLOGY/Documentation/

The current implementation uses delegation rather than Traits,  
though. There is a gazillion of delegation methods in the base  
object, possibly Traits would allow the structure to be more  
explicit ...

- Bert -




More information about the Squeak-dev mailing list