RAD Studio (Common)
ContentsIndex
PreviousUpNext
Named Option Sets Overview

Named option sets consist of options that you can create from and apply to the build-related pages of the ProjectOptions dialog box. Named option sets are saved in files with the extension .optset.

You can save a project's option values to a file as a named option set using the context menu in the Project Manager and the Save button in Project Option dialogs.

Option sets are different from configurations, though they are related. Both consist of sets of option values. The main distinction is that configurations are part of the project file; option sets are saved in files independent of projects. Saving a project saves changes to configurations, but option sets are unaffected. Changing a project's configurations and adding or deleting configurations does not affect option sets. Similarly, saving option sets does not change configurations. Each project has its own list of configurations--not option sets--independent of other projects. You can access any option set from any project.

Configurations and option sets may not contain values for all possible project options. When you save a configuration or option set, only the values that are different from the parent configuration are saved--not values for every option. An option set file does not refer to any project's configuration, since option sets are independent of configurations. 

For instance, suppose you had a project open in the IDE and the active configuration was the Base configuration. You change one option and then save the option set. The only option values saved in the option set file are the one option value you changed plus the option values in the Base configuration that are different from the defaults.

You can apply option set values to any configuration in any project using the Apply Option Set dialog. You have three choices for how you apply values: Overwrite, Replace, or Preserve.

  • Overwrite replaces the current configuration with the values from the option set entirely; values not in the option set get their default values.
  • Replace writes all the values from the option set to the current configuration, but no other values are changed.
  • Preserve writes only the values from the option set that are not already set in the active configuration.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!