Understanding TEasilyThemed

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Understanding TEasilyThemed

Andy Burnett
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

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

Thanks
AB
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Understanding TEasilyThemed

Tapple Gao
On Mon, Sep 03, 2007 at 01:00:28AM +0300, [hidden email] 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
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners