Grouping Packages
You may easily create your own precompiled package groups. For example, if you frequently use a custom grid class in your non-database Windows applications, you could create a package made up of the two packages you use in all of your programs, like this:
Code for CustomGrid.pkg:
Use Windows.pkg
Use cMyCustomGrid.pkg
If this file were saved as CustomGrid.pkg and compiled with the P option, a simple Use CustomGrid.pkg command as the first line of your program would include both packages, precompiled. Any number of packages may be grouped like this.
Precompiling this package will produce the following files:
CustomGrid.FLDCustomGrid.PBGCustomGrid.PKDCustomGrid.PRP
You must use the precompiled package as the first statement in the program that uses it, or the precompiled package will not be used, and the entire program will be recompiled, including the packages used in the precompiled package.
Example
Incorrect Usage
Code for MyWindowsApp.src:
Use SomeOtherPackage.pkg
Use CustomGrid.pkg
Object oMyCustomGrid1 is a cMyCustomGrid
:
End_Object
The above code is incorrect since it uses another package prior to the precompiled package CustomGrid.pkg. Thus, the entire MyWindowsApp.src program will be recompiled, including all files included in CustomGrid.pkg.
Correct Usage
Code for MyWindowsApp.src:
Use CustomGrid.pkg
Use SomeOtherPackage.pkg
Object oMyCustomGrid1 is a cMyCustomGrid
:
End_Object
The code above is a corrected version of this program, as it places Use CustomGrid.pkg as the first line of code in the program.