<type>documentation</type>
<domain>custom</domain>
<id>preferences-file-layers</id>
<title>Preferences File Layers</title>
<date>$Date$</date>
<version>$Revision$</version>
<product>pro+</product>

Wing stores preferences in four layers, as follows:

1) For each preference, Wing defines a default internally.

2) A preferences file that defines defaults for all users may be placed inside the 
   ``Install Directory`` listed in Wing's `About <script:about-application>`__ box.

3) Each individual user's preferences file is stored in their `User Settings 
   Directory <ref:install/user-settings-dir>`__.

4) Additional preferences files may be specified on the command
   line with one or more ``--prefs-file`` options.  For example::

     ~~FULL_EXECUTABLE~~ --prefs-file /path/to/myprefs  

Values found in a lower layer override values found higher up.

When preferences are changed, Wing writes the changes to the lowest file present
on the above list, either the last file specified with ``--prefs-file`` or
the preferences file in the `Settings Directory <ref:install/user-settings-dir>`__.  
Wing will never modify the installation-wide preferences file.

If a preference is set to the default value, as determined by the layers further
up the list, then Wing removes that value from the writeable
preferences file.  This means that the effective value of a preference can 
change in later IDE sessions even if the last file on the list above
is unchanged.  This is by design, to allow inheriting centrally managed default 
values.
