[squeak-dev] Re: Listing classes by hierarchy

Andreas Raab andreas.raab at gmx.de
Mon Aug 24 00:49:12 UTC 2009


I was just looking at the code and noticed that there is a bit of 
confusion between using classic preferences and pragma preferences. In 
this case, we have both Browser class>>listClassesHierarchically which 
is a pragma preference and Preferences>>listClassesHierarchically which 
is a classic preference. The important part is that when you use pragmas 
there should be no references to Preferences anymore. So in this case 
instead of

Preferences enable: #listClassesHierarchically.
Preferences disable: #listClassesHierarchically.
Preferences listClassesHierarchically. "test if enabled"

It would be:

Browser listClassesHierarchically: true.
Browser listClassesHierarchically: false.
Browser listClassesHierarchically. "test if enabled"

Notice that with pragma preferences code should not use Preferences 
EVER. If you find that you are using pragmas and still refer to 
Preferences it is a sign that something is wrong.

Cheers,
   - Andreas

Robert Krahn wrote:
> Hi,
> 
> I really like the way how OmniBrowser lists classes by hierarchy and 
> with indentation. I just extended the normal browser to do the same. The 
> feature is disabled by default and can be turned on with Preferences 
> enable: #listClassesHierarchically.
> 
> If you like the change I would be happy if it would be included in the 
> trunk. Right now it's here: 
> http://source.squeak.org/inbox/Tools-rkrk.111.mcz
> 
> Robert
> 
> 




More information about the Squeak-dev mailing list