|
WLC Project Builder and ProjectHook
|
WLC Project Builder v5WLC ProjectHook(Updated 13-Oct-2004) |
(wlcphk5.zip - 104KB) |
PDF Whitepaper with details on both tools and implementation details (3.13 MB).
ProjectHook Introduction video to setting up a project with the WLC Projecthook (9.37 MB)
The latest version of the WLC ProjectHook as been combined with a powerful new development tool called the WLC Project Builder. These tools cooperate with each other to provide an enhanced development environment for VFP developers
The WLC Project Builder provides an interface that consolidates some of the Project options from the VFP Project Information dialog, some of the VFP Project Builder and Version dialogs, as well as some handy hooks to the WLC ProjectHook (if instantiated), and resolves some issues with SET STRICTDATE for production builds.
This tool was designed to handle some of the ideals that I like to incorporate into when building development versions and ones l like to conform to when building the "gold" code for production releases.
Feature | Development | Production |
Recompile All Files | Default OFF | Default ON |
Display Errors | Default OFF | Default ON |
Debug Code | Default ON | Default OFF |
SET STRICTDATE TO | 2 | 1 |
Clean
Printer Code from reports (FRXs) (note this is only available with WLC ProjectHooks) |
Default OFF | Default ON |
All the settings that are retained by VFP in the project file (Auto Increment, Encrypted Executable, and Version page) are read from the settings in the project. The Process Project Audit Trail, Clean Printer Information from Reports, Project Activate, and Field Mapping features do require the WLC ProjectHook activated for the project (see below).
VFP Project Hooks were introduced with Visual FoxPro 6.0. The hook is to the VFP Project Manager. Each event is tied to feature in the Project Manager. The Project Hook allows the developer to connect code to these events. Here are the base events you can work with in your own projecthook.
Method | Use |
Activate() | Standard VFP Activate method, added in the VFP 7, fires when Project Manager gains focus. |
AfterBuild() | Allows developer to check number of errors found during the build action. This is also a great place to reset environment to settings saved before they were set in the BeforeBuild method. |
BeforeBuild() | Allows developers to stop a build based on conditions or desired parameters. Also a place to put code to prompt developers for possible settings and adjust environment for the build |
Deactivate() | Standard VFP Deactivate method, added in the VFP 7, fires when the Project Manager loses focus. |
Destroy() | Standard VFP Destroy method |
Error() | Standard VFP Error method |
Init() | Standard VFP Init method |
OLEDragDrop() | Standard VFP OLEDragDrop method |
OLEDragOver() | Standard VFP OLEDragOver method |
OLEGiveFeedBack() | Standard VFP OLEGiveFeedBack method |
QueryAddFile() | Fires when a new file of any type is added to the project. Code can be included that will certify that file can be added to the project. Including logic that performs a NODEFAULT makes it so the file is not added to the project. |
QueryModifyFile() | Fires when an existing file of any type is selected to be modified from the project. Code can be included that will certify that file can be modified from the project. Including logic that performs a NODEFAULT makes it so the file is not modified through the project. |
QueryNewFile() |
Fires when the New button is fired in the Project Manager, added in the VFP 7. |
QueryRemoveFile() | Fires when an existing file of any type is selected to be removed from the project. Optionally you can delete the file from disk as well. Code can be included that will certify that file can be removed from the project. Including logic that performs a NODEFAULT makes it so the file is not removed from the project. |
QueryRunFile() | Fires when an existing file of any type is selected to be run from the project. Code can be included that will certify that file can be run from the project. Including logic that performs a NODEFAULT makes it so the file is not run from the project. |
SCCDestroy() | Introduced in VFP 9 to allow developers to interact with the source code control provider when a project is closing. This event is fired after the Deactivate, but before the Destroy when the project is opened. |
SCCInit() | Introduced in VFP 9 to allow developers to interact with the source code control provider when a project is opening. This event is fired after the Init, but before Activate when the project is opened. |
I utilize the ProjectHook to take care of some features I have wanted in VFP (and FoxPro 2.x for that matter).
|