next up previous contents
Next: Writing values Up: Technical description Previous: Initialisation   Contents

Reading values

When values are read, the profile will first check its own configuration, then try to inherit the value if it doesn't find it. It goes through the following steps, returning a value as soon as one is found:

  1. If its own wxFileConfig *m_config is not NULL, it will try to read the value from there (i.e. from the profile file).
  2. It will look up its exact location in the global configuration object. The exact location is found by asking its parent profile for its path and appending its own name to it. I.e. the ComposeView profile called from the main window would return an exact location "M/Profiles/ComposeView". If a ComposeView window was opened from a FolderViewFrame showing a mailfolder "MyFolder", the path might look like this: "M/Folders/MyFolder/ComposeView", as the profile was created with the mailfolder profile as parent. So it would try to read the value from this section if it exists.
  3. If still not found, it will go up the path in the configuration and try to find the value there, i.e. it would try "M/Folders/MyFolder", "M/Folders" and "M".
  4. If not found, it will forward the request to its parent profile.
  5. If not found, it will look in the global profile (==global configuration in [M/Profiles] section).
  6. otherwise return the default value


next up previous contents
Next: Writing values Up: Technical description Previous: Initialisation   Contents
Charlie & 2001-04-19