Working with Files in a Project
Once you have added all of the files in your application to a project, you can access those files through the project window.
Editing a Source File
All source files that can be opened in IDL, .pro and .prc files (IDL GUIBuilder files can be opened on Windows only), can be opened directly through the project windows. To open a file for editing, complete the following steps:
- Open your project. Select File
Open Project. Select the path and name of your project file.
- Access the shortcut menu by right-clicking over the file you want to open. Select Edit from the shortcut menu. Source files (
.pro) are opened in the IDL editor and GUIBuilder files (.prc) are opened in the IDL GUIBuilder
Tip
You can also edit a .pro or .prc file by double-clicking on the filename. On Windows you can also drag the file from the Project window to the IDL Editor window to open the file. |
Compiling a File
All source files can be compiled through the project window. To compile a file, complete the following steps:
- Open your project. Select File
Open Project. Select the path and name of your project file.
- Access the shortcut menu by right-clicking over the file you want to compile. Select Compile from the shortcut menu. The file is compiled.
For more information on how to compile all the files in your project or just the files that have been recently modified, see Compiling an Application from a Project.
Testing a File
All IDL GUIBuilder files (.prc) can be run under test mode directly through a project. To run a .prc file in test mode, complete the following steps:
- Open your project. Select File
Open Project. Select the path and name of your project file.
- Access the shortcut menu by right-clicking over the file you want to test. Select Test from the shortcut menu. The file is run in test mode.
For more information on running .prc files in test mode, see Running the Application in Test Mode.
Tip
You can also compile and run IDL GUIBuilder files on any platform by building your project. For more information, see Building a Project. |
Setting the Properties of a File
Each file in a project has properties. To view the properties of a file, access the shortcut menu by right-clicking over the file you want to test. Select Properties from the shortcut menu. Alternatively, you can select the file and click the File Properties toolbar button. The File Properties dialog appears as shown in the following figure.
Figure 22-7: File Properties Dialog
Figure 22-7: File Properties Dialog
|
|
The following table describes each property in detail:
Table 22-2: File Properties
Table 22-2: File Properties
|
Property
|
Description
|
|
File name
|
The name of the file. (This field is read only.)
|
|
Group
|
The name of the group in which the file resides. (This field is read only.)
|
|
Path
|
The path of the file. (This field is read only.)
|
|
File Found
|
This box appears grayed out when a file is found. If the file is not found, clicking on this checkbox displays a dialog so that you can specify the path of the file.
|
|
Compile File
|
Indicates whether or not to compile the file when running or building. For example, you may have included files for your main program that you do not want compiled. Leaving this check box blank indicates that you do not want this file compiled.
Note - Non-source files such as data files and image files will be automatically excluded from compilation.
|
|
Export
|
Indicates whether or not to export the file when exporting a project. Some files, such as data files that you need to use when creating your application, are files that you do not want to export. When checked, this file will be exported.
|
To set the properties for a file, complete the following steps:
- Open your project. Select File
Open Project. Select the path and name of your project file.
- Click on the plus sign to expand the listing of the project files until you see the file you want to change.
- Access the shortcut menu by right-clicking over the file for which you want to change the properties. Select Properties from the menu. The File Properties dialog is displayed.
- Select whether to compile the file. Check the Compile File checkbox to mark the file for compiling when running or building an application.
- Select whether to export the file. You may select to export files such as data files if they are a necessary component of your application. Other data files which you have used for development but that aren't necessary need not be selected. Check the Export checkbox to export the file with your distribution. For information on arranging files for successful exporting, seeWhere to Store the Files for a Project.
- Click OK.
- Save your project file by selecting File
Save Project.
Modifying Properties of Multiple Files
To set the properties of a number of files at a single time, hold down CTRL and right-click to select multiple files in the Project window. Click the File Properties toolbar button. In the dialog which appears, you can select the Compile File or Export properties of "Multiple Files."
Figure 22-8: Multiple File Properties Dialog
Figure 22-8: Multiple File Properties Dialog
|
|
In addition to setting file properties, you can also set the properties of your project. Through the Project Options dialog, you can control run and compile commands as well as selecting the type of project to create. See Setting the Options for a Project for instructions.
IDL Online Help (March 06, 2007)