[squeak-dev] Preference Pragmas in instance methods?

Chris Muller asqueaker at gmail.com
Sun Mar 7 00:06:57 UTC 2010

Nicolas asked me to move the #traceMessages preference to
SystemNavigation and implement it as a pragma.

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

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?  :)

More information about the Squeak-dev mailing list