[Newbies] Traits

andy.burnett at knowinnovation.com andy.burnett at knowinnovation.com
Mon Sep 3 15:42:15 UTC 2007


Thanks Matthew, that's interesting. I have never heard of traits.  So 
'uses:' is a way of incorporating behaviour/values which don't naturally 
inherit?

cheers
AB


This is not a class; it is a trait. Traits are separate from
classes.

Object is not special; neither is it's superclass ProtoObject.
ProtoObject, the root object is just a subclass of nil.

> 2. What does uses: mean?  I haven't seen this in a class definition 
> before.

uses: can be added to any class or trait definition to signify
that this class/trait incorporates some traits into it's
behavior definition. The only senders I know of in a stock image
are ClassDescription and TraitDescription; traits are not used
much yet


More information about the Beginners mailing list