[Newbies] Re: Traits

Klaus D. Witzel klaus.witzel at cobss.com
Tue Sep 25 08:00:31 UTC 2007

Hi Nick,

on Tue, 25 Sep 2007 02:00:50 +0200, you wrote:

> Armed with new knowledge of Traits gained from the excellent "Squeak By
> Example" I tried:
>     Smalltalk allClasses select: [:each | each hasTraitComposition]
> which gave:
> an OrderedCollection(ActionSequence BalloonBezierSimulation BalloonEngine
> BalloonEngineConstants BasicRequestor Behavior BrowserProvider
> ....WorldMenuProvider XMLTokenizer ZipConstants ZipFileConstants)
> However browsing to a random class say "ActionSquence", doesn't show any
> evidence of Trait composition. Is this a problem with the current  
> browser?

You're right, (TraitComposition allInstances reject: [:each | each  
isEmpty]) size gives just 17 in my squeak-web image but TraitComposition  
allInstances size reports 325. Could you report your find on  
bugs.squeak.org, this should be investigated if empty TraitComposition  
should really populate the image. Perhaps #traitComposition was used  

> Also is there a way to browse a Trait say TPureBehavior

Just select that name and alt-b opens a browser on TPureBehavior.


> My image is based on: sq3.9-7067web07.08.1
> Thanks
> Nick

More information about the Beginners mailing list