White Light Computing, Inc.
Guiding your Information Technology investment toward success!


VFP Metadata Source Code Printing Tools

Form and Class Printing

Report Printing

Menu Printing

RAS PrintCX (rasprtcx.zip - 18KB)

(Updated 10-Jun-2000)

[formerly known as FormWalkThru.prg]

The Form/Class source code lister provides a printout of the details inside of the Form or Visual Class Library meta data files. First you are prompted for a SCX (form metadata table) or a VCX (visual class metadata table).  If the file selected is a Visual Class Library you are presented with the class selection dialog.  This gives the developer an opportunity to select just one class (canceling this dialog prints details from all classes).  Then the program evaluates the different objects.  The listing presents the code (methods) and attributes (properties) for each object as well as some other details stored inside the metadata.  The objects are grouped by container (ie, all objects in a grid, all the objects on a page inside a pageframe, etc.).

This tool was designed to allow teams to review code developed by other developers on their team.  The output is presented in a report preview so the developer can check it out before printing the report to the printer.  Please note that even average forms can generate 30 pages of output.   Great care was taken to keep the output as small as possible <gd&rf People with bad vision>.

This is an alternative to the VFP Class Browser which outputs the same information in object order. This program reports the object information by container, then in object name order.  For instance:

Form Level DataEnvironment
Form Level frmBase1
Dataenvironment Cursor1
Frmbase1 pgfAddress
Frmbase1.pgfAddress.Page1 shpBase1
Frmbase1.pgfAddress.Page1 cboCphonecat
Frmbase1.pgfAddress.Page1 chkLchristmas
Frmbase1.pgfAddress.Page1 chkLfamily
Frmbase1.pgfAddress.Page1 chkLroadrally
Frmbase1.pgfAddress.Page1 edtMcomment
Frmbase1.pgfAddress.Page1 lblCaddress1
Frmbase1.pgfAddress.Page1 lblCaddress2
Frmbase1.pgfAddress.Page1 txtCaddress1
Frmbase1.pgfAddress.Page1 txtCaddress2
Frmbase1.pgfAddress.Page1 txtCcity
Frmbase1.pgfAddress.Page1 txtCcountry
Frmbase1.pgfAddress.Page1 txtCfirstname
Frmbase1.pgfAddress.Page1 txtTupdated
Frmbase1.pgfAddress.Page2 Grid1
Frmbase1.pgfAddress.Page2.Grid1.Column1 Header1
Frmbase1.pgfAddress.Page2.Grid1.Column1 Text1
Frmbase1.pgfAddress.Page2.Grid1.Column2 Header1
Frmbase1.pgfAddress.Page2.Grid1.Column2 Text1
 

One item to note is the following #DEFINEs which points to the report that is run for the output.  This is coded to my directory structure, you may want to change this to work in your development environment.

* Modify these DEFINEs to match your development environment

#DEFINE ccOUTPUT_REPORT "\DevVFP6Apps\MetaTools\RASPrintCX01.frx"

#DEFINE ccPROJLIST_LIB  "\DevVFP6Apps\MetaTools\cMeta.vcx"

Version 2.0.1 Enhancements

  • Developer can now select one class in a class library (canceling the Get Class Dialog will still print all classes in the library).
  • Some significant changes were made in identifying the information in the different "Reserved" fields in the metadata. 
  • A couple of changes were made to the report layout to reduce some of the paper used in the output. 
  • Line numbers are optionally printed (based on memory variable llCodeLineNumbers) in the method code and the property/method descriptions.  This makes it easier for developers to reference the line of code when they find an issue during a code walkthrough. 

RAS PrintFRX (rasprtfrx.zip - 16KB)

(Updated 10-Jun-2000)

[formerly known as ReportWalkThru.prg]

The Report Code Lister provides a printout of the details inside of the Report Form meta data file. First you are prompted for a FRX (report metadata table), then the program evaluates the different objects.  The listing presents the code (methods in the dataenvironment or fields on the report) and attributes for each object as well as some other details stored inside the metadata.  The objects are listed in the order they appear on the report from top to bottom and left to right.  This tool was designed to allow teams to review code developed by other developers on their team.  The output is presented in a report preview so the developer can check it out before printing the report to the printer.  There is no tool in VFP that lists code stored in the report form.

One item to note is the following #DEFINEs which points to the report that is run for the output.  This is coded to my directory structure, you may want to change this to work in your development environment.

* Modify these DEFINEs to match your development environment

#DEFINE ccOUTPUT_REPORT "\DevVFP6Apps\MetaTools\RASPrintFRX01.frx"

#DEFINE ccPROJLIST_LIB  "\DevVFP6Apps\MetaTools\cMeta.vcx"

Version 2.0.1 Enhancements

  • The big improvement was adding the description for the numeric report object type. 
  • The report output was rearranged to address usability issues (fields moved, TAG and TAG2 added, dash-dot line instead of hard line). 
  • Added on the metadata record number in case the developer need to hack/tweak the information manually. 
  • The tool was renamed to something more in line with the functionality.

RAS PrintMNX (rasprtmnx.zip - 12KB)

(Updated 22-Feb-2004)

[formerly known as MenuWalkThru.prg]

The Menu Code Lister provides a printout of the details inside of the Menu metadata file.  First you are prompted for a MNX (menu metadata table), the program evaluates the information in the metadata table, and then lists off each of the menu options.  Information included is Pad Prompts, Bar Prompts (along with relative position on the drop down), Status Bar Messages, hot keys, procedure code (setup, cleanup, and procedures for each bar), relative positioning of Menu Pads, and bars names.

One might note that Visual FoxPro still generates the program code for the menu via GenMenu.prg and that the code is very readable for a walkthrough.  This is true.  The RAS PrintMNX does not attempt to duplicate this technique.  It provides a "graphical" representation of the menu for the developers to look at and evaluate with the core code next to it.

One item to note is the following #DEFINE which points to the report that is run for the output.  This is coded to my directory, you may want to change this to work in your development environment.

* Modify this DEFINE to match your development environment

#DEFINE ccOUTPUT_REPORT "D:\DevVFP7Apps\MetaTools\RASPrintMNX02.frx"

This was originally written to help my teammates look at the code behind the menu, but is an excellent way to review code in a menu as a team.  These reviews enhance the supportability of the application's menu.  It can also be used as a training aid for junior developers on your team, or to bring experienced developers up to speed if they are new to Visual FoxPro.

Version 2.2.1 Enhancements/Bugs fixed:

  • Fixed bug when run in VFP 8 due to changes in AFIELDS() array size.
  • Fixed bug with BAR images triggering file does not exist errors.

Version 2.1.1 Enhancements:

  • Added support for the new VFP 7 image/resource files.
  • New report added with significant changes made in to make it more readable, reduce the paper output, and eliminate the unnecessary fields in the incorrect report band.

Version 2.0.1 Enhancements:

  • Added on the metadata record number in case the developer need to hack/tweak the information manually. 
  • The tool was renamed to something more in line with the functionality.

       
Trouble with the menu? Try this site map.

Send mail to with questions or comments about this Web site.
Copyright © 2004-2020  White Light Computing, Inc.
All Rights Reserved Worldwide
White Light Computing Privacy Statement
Last modified: 07.29.2020