Importing the Universal Path Selection Procedure TXA |
|||
Importing the Universal Path Selection Procedure TXA |
|
||
To save time, you can use the Utility Template Wizard to import the ProPath Select Path procedure into your application.
Just click this button on the toolbar:
or use the Utility Template option from the pulldown menu:
Type ProPath in the locator field to jump to the template. Highlight it and click Select to import the procedure.
After the import you should see the procedure in the Application Tree:
About the Universal Path Selection Procedure
If you open the imported procedure in the Window Designer, you will see this screen:
There are different controls that need to be shown to the user based on the ProPath Mode (as indicated on the First Run tab).
In some modes, only the MAIN path can be set. In other modes, only the SYSTEM path can be set. Some modes allow for both the MAIN and SYSTEM paths to be set.
To make it possible to have one "Universal" procedure, a Sheet and Tab combination was used to construct the combinations.
The sheet and tabs are hidden at runtime and (based on the Mode) only one set of controls is displayed.
You can see an example of what it looks like at runtime here.
Important: while you can freely change colors, fonts and icons, you should not rename or reorder tabs. If you do then you will most likely break the embed code for this procedure.
Below are screen shots of the three tabs in the Window Designer that show what controls are available:
MAIN Path Selection
This is the screen displayed when only the MAIN data path may be confirmed or selected:
SYSTEM Path Selection
This is the screen displayed when only the SYSTEM data path may be confirmed or selected:
MAIN and SYSTEM Path Selection
This is the screen displayed when both the MAIN and SYSTEM data path may be confirmed or selected:
Designing Your Own Window
If you don't want to use the Universal procedure, click here for details on designing your own.
ProPath Suggest
The ProPath First Run Support template has a nice feature built in called ProPath Suggest.
This feature (if your global extension selections allow the user to change the path and the configuration permits it) will use local ProPathFolderClass objects and template settings to "Suggest" CSIDL based paths.
Note: If you don't see the two tabs below it is because your global settings do not allow it or you have not checked the Suggest a CSIDL based location box below
Enabling ProPath Suggest
To enable ProPath Suggest, check this box:
Then click the MAIN Suggest or SYSTEM Suggest tabs to configure the settings.
MAIN Suggest
The MAIN Suggest tab lets you pre-configure a suggested location for the user to place their data based on a combination of CSIDL and folder values as shown here:
These values and how to set them are identical to what you would see if you had the MAIN data location set to use a Fixed CSIDL value as shown here.
Information on selecting the proper CSIDL can be found here.
Note: in order to properly use CSIDL locations you need to add at least one folder level below the base folder.
Microsoft Guidelines suggest a structure like this:
<CSIDL Location>\<Company>\<Product>\<Optionally a Dataset>
or this:
<CSIDL Location>\<Product>\<Optionally a Dataset>
Hint: The screen shot above shows the default value which shows the Company Name as being a level under the user's My Documents folder. However it is our belief that most users look for the Product name first, so you may want to change the entries as shown below:
All we do is move the Product (program) name up into the field labeled as Company.
This would result in the suggested path being like this:
XP C:\Documents and Settings\User Name\My Documents\DemoDefault
Vista C:\Users\User Name\Documents\DemoDefault
Windows 7 C:\Users\User Name\Documents\DemoDefault
SYSTEM Suggest
The SYSTEM Suggest tab lets you pre-configure a suggested location for the user to place their data based on a combination of CSIDL and folder values as shown here:
These values and how to set them are identical to what you would see if you had the SYSTEM data location set to use a Fixed CSIDL value as shown here.
Information on selecting the proper CSIDL can be found here.
Note: in order to properly use CSIDL locations you need to add at least one folder level below the base folder.
Microsoft Guidelines suggest a structure like this:
<CSIDL Location>\<Company>\<Product>\<Optionally a Dataset>
or this:
<CSIDL Location>\<Product>\<Optionally a Dataset>
Hint: in this case we are dealing with application (or SYSTEM) data. So our belief is that using the both Company name and the Product name is the best way to go. This is what most companies do for data stored in the APPDATA type folders.
This would result in the suggested path being like this:
XP C:\Documents and Settings\User Name\Application Data\LANSRAD\DemoDefault
Vista C:\Users\User Name\AppData\Roaming\LANSRAD\DemoDefault
Windows 7 C:\Users\User Name\AppData\Roaming\LANSRAD\DemoDefault
Important: You are always well advised to follow the Microsoft suggested guidelines, but you also need to take into account the expectations of your users.
For most of them, your application will not be the only thing installed on their computers. If you use non-standard data locations or naming practices, then it may affect what they think about the quality of your software.
Putting it to the test
The first time we run the DemoDefault application on a XP computer we will see this screen: