Configure "Create New" Dialog
Use the Configure Create New dialog to maintain user-defined items in the Studio's Create New dialog for the current workspace.
The dialog is divided into two panels: the left panel contains a tree view, and the right panel displays information relating to the currently selected item in the tree.
Click the Add button to add a new template or wizard to the currently selected category. To delete a template, click the Delete button (note that the physical template is not deleted, just its registration within the Studio).
Templates
New components are created by selecting an option that starts a wizard or by selecting an option that creates a file based on a template file. Template files are stored in a “config” directory and, by convention, have a “.tpl” file extension. The config directories are defined in the workspace (the workspace’s AppSrc\config directory), in each library (each library’s AppSrc\config directory), and in the system library (…\pkg\config).
If you wish to add a new component to your Create New dialog, you will probably want to create a new template file for that component. To do this, simply create or copy the appropriate template file into your workspace’s AppSrc\config directory and save it using the suggested “.tpl” file extension. If you wish to change a template, find the file, load it, and change it.
You should never change or add templates that reside outside of your workspace. This includes templates that reside in a library or system area. This is discussed below.
System & Library Templates
Only wizards and templates that have been added to the list for the current workspace can be edited or removed. System and Library wizards and templates are read-only.
- System wizards and templates are the wizards and templates installed with DataFlex.
- Library wizards and templates are the wizards and templates that belong to one or more libraries that are used by the current workspace.
If you wish to make changes to a library, you can do so by making that library the current workspace and invoking this dialog from that library’s workspace. Changes can be made to a library’s template file by loading the appropriate template file (located in the library’s AppSrc/config directory) and editing it. Changes made in the library’s configuration list or template content will be applied to all workspaces that use that library.
You should not change the contents of the system template files. If you need to change these templates, you can copy these files from the system config directory (…\pkg\config) into a workspace or library config directory where they can be edited.
When templates are selected, the Studio looks for the template file first in the following order:
- The workspace config directory
- Any library config directories
- The system config directory
For more information, see: Add/Remove Libraries.
File Category Treeview
The tree on the left of the dialog shows all the wizards and templates that have been registered, categorized by file category.
Project
Project wizards & templates.
View/Report
View and report wizards and templates.
Dialog/Lookup
Dialog and Lookup list (or selection list) wizards and templates.
Web Object
Web Service Object (WSO) or web object (Web View or Web Modal Dialog) wizards and templates.
Class
Class declaration wizards & templates.
Other
Templates and wizards for creating other types of files.
For more information, see: Component Files.
Data Entry
To edit an entry, first select it in the file category tree view. Note: System templates and wizards are read-only. Library templates or wizards can only be edited from the imported library's workspace.
Component Type
Select what type of component you are adding to the selected file category. Each file category will allow a different subset of component types. Select the one that best fits the template or wizard that you are adding or editing.
In some cases, the component type will determine whether or not the template or wizard can be used to create a new file. This filtering is determined by the workspace's current project. For example, if the current project is a Windows Project, then you will be able to create a Windows View but not a Web Object (Web Objects can only be created for a Web Application Project).
For more information, see: Create New.
Name
Enter the name of the template or wizard that is displayed in the Create New dialog for this entry.
File Name
Enter the file name of the template or wizard. Wizard files must be executable applications. For example, "WinViewWizard.exe".
Note: The Studio only supports file and folder name characters using the standard ASCII character set (ASCII characters 32-127).
Large Image
Enter the filename of a bitmap file that is displayed in the Create New dialog for this entry. The set of system-defined bitmaps for each file category is listed in the combo to make these images easily accessible. The selected icon is displayed to the right of the filename. Template images must reside in the workspace's Bitmaps folder.
Long Description
Enter a description for the template or wizard. This description will be displayed in a box in the Create New dialog whenever the item is selected by the user.
Operations
Add
Click Add to add an entry to the currently selected file category.
Delete
Click Delete to remove the currently selected entry in the file category tree view. Note: System templates and wizards are read-only. Library templates or wizards can only be removed from the imported library's workspace.
OK
Click OK to save changes and close the dialog.
Cancel
Click Cancel to close the dialog and discard all changes.