[squeak-dev] Preference Pragmas in instance methods?

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sun Mar 7 01:38:52 UTC 2010

2010/3/7 Chris Muller <asqueaker at gmail.com>:
> Nicolas asked me to move the #traceMessages preference to
> SystemNavigation and implement it as a pragma.

I would say suggested...

> SystemNavigation is a Singleton, therefore the SystemNavigation
> #default instance uses instance-side methods to, for example, define
> its 'browserClass' and 'hierarchyBrowserClass'.
> After trying to add #traceMessages there, I quickly discovered that
> Preference pragmas were intended only to be for class-side methods.
> Noting in Preferences class>>#prefEvent:, it sets up the
> SystemChangeNotifier to only worry about classes that are #isMeta.
> I could refine that #isMeta guard to allow singletons, although to do
> that I'd want to introduce a Singleton class and move SystemNav
> there...
> Another thing we could do is remove the guard; if someone puts a
> preference pragma in an inst-method, any problem with that?
> Of course, we could just keep it as a standard old preference..
> Anyone have any preferences?  :)

What an instance side preference would mean ?
A different preference for every instance ?
My opinion is that they belong to class only.


More information about the Squeak-dev mailing list