[Newbies] Understanding TEasilyThemed

Matthew Fulmer tapplek at gmail.com
Sun Sep 2 22:14:30 UTC 2007


On Mon, Sep 03, 2007 at 01:00:28AM +0300, andy.burnett at knowinnovation.com wrote:
> I have now successfully got the new UI themes working - thanks to everyone 
> for their advice.
> 
> Looking through the code I see quite a few classes which are defined like 
> this:
> 
> TEasilyThemed classTrait
>         uses: {}
> 
> This raises a few questions for me
> 
> 1. As there is no subclass message it seems to imply that TEasilyThemed is 
> at the same level as Object.  Is that right? because I thought that all 
> objects were actually subclasses of Object

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

-- 
Matthew Fulmer -- http://mtfulmer.wordpress.com/
Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808


More information about the Beginners mailing list