Project-specific preferences

Ned Konz ned at squeakland.org
Tue Mar 2 22:10:50 UTC 2004


On Sunday 29 February 2004 12:32 pm, C. David Shaffer wrote:
> Has anyone hacked together something to make the standard preferences
> project-specific?  I searched the mailling list but don't see anything.
> I see that projects have "projectPreferenceFlagDictionary" but they
> don't seem that widely used.  Things like colors and font sizes are
> often project-specific for me so I've written little scripts to swap
> preferences when I swap projects...it really isn't very convenient.
> Really this is rather a silly, low priority thing.  I just like my tool
> colors to match my background :-)

I have been working on this on and off (along with having preferences 
inherited from parent projects).

> Assuming it hasn't been done, how's this for a quick way to make this
> work without having to rewrite all the references to Preferences....I
> could rename the Preferences class (without updating references), make a
> doesNotUnderstand: proxy, install it in Smalltalk at: #Preferences and
> have it look up the current project preferences to redispatch the message.

An easier way is to just copy the preferences/parameters to the Project 
parameters when you create a project and on entering a world copy them back 
in.

Of course, individual flags can be set as project-specific if they're not 
hard-coded (that is, if there is really a Preference that represents them).

-- 
Ned Konz
http://bike-nomad.com/squeak/



More information about the Squeak-dev mailing list