[Morphic][Preferences] Some note on Preferences parameteres dictionary

hannes.hirzel.squeaklist at bluewin.ch hannes.hirzel.squeaklist at bluewin.ch
Mon Mar 18 10:19:00 UTC 2002


Martin Drautzburg <martin.drautzburg at web.de> wrote:

> 
> Preferences and Parameters
> 
>         There is a class "Preferences" that answers various questions,
>         like "Window color". It sometimes seems to decide that itself
>         and sometimes it looks things up in "Parameters". Now what is
>         this "Parameters". Syntactically it looks like a Class or a
>         global Variable, but it is neither the one nor the other.

It is a so called class variable.

You can have access to it by sending the message #inspectPreferences to
the class #Preferences

Put the following expression into a workspace or just select it and
choose 'do-it' if you are reading this mail in Scamper

	Preferences inspectPreferences


>         I can inspect Parameters (it is an IdentityDictionary - I
>         guess this is what a perl programmer would call a "hash") when
>         browsing the Preferences class, but not by simply highlighting
>         the word "Parameters" in the workspace.

An IdentityDictionary is what would be called "hash" in the Perl
context.


>         What is this "Paramters" thingy ?

A class variable which holds an IdentityDictionary which keeps objects
of the class Preference (Singular!). It is like in VisualBasic - you
have a collection class named with the plural which keeps objects having
a class name in singular.


The standard end-user way of dealing with the preferences is through

World menu>help>Preferences ....

(Side remark: It should be better moved up to the World Menu some time)


 
> MorphExtensions


There is some information on MorphExtensions on 
http://minnow.cc.gatech.edu/squeak/1820  (Morph and then the link to
MorphicExtension)
though far from complete.  Read also about World and PasteUpMorph.

At the moment I do not have time to write up an answer.
Perhaps it is an idea to repost your question more specifically if you
don't get enough information. We could later on update the information
there.

Regards
Hannes Hirzel



More information about the Squeak-dev mailing list