[Company Logo Image]

Home Up Feedback Search

Services Ed4W & Progress Progress Neat Stuff Links

Check Syntax/Compile

 

 

Table Names
Check Syntax/Compile
Xref
Section Editor
Load DF
Build Project
Viper Skeletons
Of Expander

The most commonly requested ability while using Ed4W is to be able to check syntax, or compile.  Related to this is the ability to see error messages and automatically go to the line in the program in which the compiler reports the error.

What this enhancement does:  Creates a new "build program" that runs a Progress program that tries to compile the program you are editing.  Any compile errors are written to the Ed4W Debug window, from which you can use Ed4W's error tracking feature.

First, download the file TTTEd4W.zip and unzip the file CheckSyntax.p to your Progress working directory. 

Next, in Ed4W create a "Build Program" similar to this example.  You may need to modify the command line to account for the directory where Progress resides, any startup parameters required by your application (for example you may need -ininame), and/or your Progress working directory.

At this point you should be able to run this from Ed4W to check syntax for the Progress program you are editing.  Some common problems and solutions:
Problem Solution
Your database is not connected. Create a connect.pf file in your Progress working directory with the appropriate parameters to connect to your database.
Propath is not correct, or other elements of the Progress environment are not correct. Use the -ininame and -basekey parameters to point to the correct environment location.
Aliases required by your application are not defined. Edit CheckSyntax.p; add appropriate "create alias..." lines.

Notes: 
bullet A .r file will be saved from a successful compile if the source code file has had the "compile on save" flag turned on in the AppBuilder, or if a .r file already exists.
bulletIt is possible to set the Progress propath using the "Environment Variable" field in the Ed Build Setup dialog.   However Progress only uses the environment variable if no propath is specified in the registry section or INI file being used.  And since Progress will use a registry section by default if you don't specify one, the only way to use an environment variable to specify the propath is to use a registry section or INI file with no propath specified.
bulletIf you suspect that the propath is not being set correctly for the Progress session that is being run, you can confirm this by finding the commented out section of code in CheckSyntax.p and un-commenting it.  This will cause the propath to be written to the output window along with any syntax errors.
bulletIf you work with multiple Progress-based applications, it's possible to create a single Ed4W build program that will compile appropriately (connected to the correct database(s) and with the correct propath) whichever one you are working on at the time.  Here's how to do this:
bulletCreate a separate Ed4W project for each application you work on.
bulletCreate a connect.pf file for each application, which connects to the appropriate database(s), and put it in the project directory for that application instead of your Progress working directory.
bulletCreate a progress.ini file for each application, with the appropriate entries for propath, fonts, etc., and put it in the project directory for that application.
bulletModify the command line above as follows:
bulletChange the -pf parameter to: 
-pf "<PROJ_DIR>\connect.pf"
bulletAdd these parameters:
-basekey INI 
-ininame "<PROJ_DIR>\progress.ini""

Once you have this working from the Build Setup menu, you will probably want to create an icon on a toolbar to run it.  The steps to do this are found on the Ed4W FAQ page.

Click here for your Free Trial copy of ED for Windows, the power packed programmers editor
Click here for your Free Trial of ED4W

 

Copyright © 2005 Tim Townsend Technologies. All rights reserved.
Revised: July 04, 2005 .