Environment Manager Task Pane
The Environment Manager is a tool you can use to manage and organize environment settings for reusable development needs such as at a specific client or project level. For example, you might have multiple projects for a specific client that all use the same form template (e.g., one with the client's logo) and environment settings (e.g., data paths). The Environment Manager lets you create environment sets which are packages of settings you can apply at any time. These settings include SET commands, Form and Formset templates, and Field class mappings.
To access the Environment Manager Task Pane, select Task Pane from the Tools menu to bring up the Task Pane Manager. Choose the Environment Manager Task Pane from the Task Panes drop-down list box at the top.
The Environment Manager Task Pane itself is simply a shell with a link that opens the actual Environment Manager tool. To open the tool, simply click on the Manage Environment link. This Task Pane also lists available Environment Sets and their associated projects. When you select a project, the Environment Set will be applied before the project opens.
The Environment Manager tool is also a stand-alone application and can be run outside of the Task Pane Manager. To run the Environment Manager as a separate application, execute the following command from the Command window.
DO HOME() + ENVMGR.APP
Note
The Environment Manager stores its Environment Sets in a table named Envmgr.dbf, which is stored in your user data directory (see HOME(7)).
Working with Environment Sets
You can manage and apply your Environment Sets as follows:
Environment Set List
Lists all the Environment Sets available for use.When you launch the Environment Manager, your current settings are displayed in a reserved set named <current>. This is used when you click New to create a new set.
The <default field mapping> set is another reserved set that is used to store your original Field Mapping settings stored in the Options dialog box. If you have applied an Environment Set with custom mappings, you can later reset to your defaults by selecting this reserved set and clicking the Set button.
- New
Creates a new Environment Set. Once your new set appears in the list, you should rename it.
- Copy
Creates a new Environment Set based on the one selected in the Environment Set List.
- Remove
Deletes the selected Environment Set.
- Set
Applies the settings defined in your Environment Set to current Visual FoxPro environment.
- Name
Lets you specify a friendly name for your Environment Set.
Default Directory/Path
The Default Directory/Path page lets you specify settings for your Environment Set that relate to file locations.
- Default Directory
Specifies the default directory to use when the Environment Set is applied. This is equivalent to using the CD | CHDIR Command.
- Path
Specifies a list of search paths to use when the Environment Set is set. This is equivalent to using the SET PATH Command.
- Directory
Lets you change the path selected in the Path list.
- Add Path
Adds a new path to the Path list.
- Copy
Adds a new path to the Path list based on the selected one.
- Remove
Removes the selected path from the Path list.
Environment Settings
The Default Directory/Path page lets you specify settings for your Environment Set that relate to file locations.
Setting table
Lets you specify values for common SET commands you want applied when the Environment Set is set.Tip
You can add additional items that appear in this table by editing Envmgr.dbf, which is stored in your user data directory (see HOME(7)).
- Resource file
Specifies the resource file to use when the Environment Set is set. This is equivalent to using the SET RESOURCE Command.
- Run script before environment is set
A script of Visual FoxPro commands that is executed prior to the settings in Environment Set being applied.
- Run script after environment is set and project is loaded
A script of Visual FoxPro commands that is executed after the Environment Set is applied.
Field Mapping
The Field Mapping page lets you specify settings for your Environment Set that relate to control classes used for mapping fields when you drag and drop a field from the Data Environment or Database Designer to a form or container. For more information, see Field Mapping Tab, Options Dialog Box and How to: Create Controls by Dragging and Dropping Fields or Tables. You can restore your original Field Mapping settings by selecting <default field mapping> and clicking the Set button.
Forms
The Forms page lets you specify settings for your Environment Set that relate to form and formset templates that are used when creating a new form or formset. For more information, see Forms Tab, Options Dialog Box.
Associated Projects
The Associated Projects page lets you specify projects in which the Environment Set is applied when the project is opened from the Environment Manager Task Pane. The Task Pane lists all of your custom Environment Sets along with their associated projects.
- Projects table
Lists projects associated with the selected Environment Set.
- Add
Adds a project to the set.
- Remove
Removes a project from the set.