> From: Hans-Martin Mosner
> Sent: Wednesday, March 08, 2006 5:31 PM
> >Tom Phoenix wrote:
>
> >>On 3/8/06, Corneanu Dan <
[hidden email]> wrote:
> >>how can I inspect the TTFontDescription's class variable named
> >>'Descriptions' ?
> >
> >This expression lets you "inspect it":
> > (TTFontDescription bindingOf: #Descriptions) value
> >Hope this helps!
> >--Tom Phoenix
> Or you can select the class var name in the browser while showing the
> class definition, and then use the 'inspect it' menu choice.
> (when a class is selected in the browser, its scope is available to code
> executed in the text pane.)
>
> Cheers,
> Hans-Martin
>
There are times where class variables can be useful outside the scope of the
class. Not many mind you but some. In those cases it's better to write an
accessor for the class variable. If you really need access to #Descriptions
on TTFontDescription then, in my opinion, you should implement on the class
side the following
TTFontDescription class >> descriptions
"return to the sender the content of the class variable
Descriptions"
^Descriptions
The major benefit of doing it this way is that you can then look for senders
of the accessor and find out where it is used (and then move the code where
it belongs on TTFontDescription)
Happy coding!
Ron Teitelbaum