Article ID: 134620
Article Last Modified on 3/24/2000
APPLIES TO
- Microsoft Visual FoxPro 3.0 Standard Edition
This article was previously published under Q134620
SYMPTOMS
When a screen built in FoxPro version 2.x that contains a #REGION statement is converted, the converter halts, and displays this error message:
CAUSE
This is an error in the Converter. The error occurs when the #REGION statement is located in an object's code or in the Cleanup code - but not in the Setup code. This causes the GENDIRCOUNT variable to be passed to a method when it was not initialized.
WORKAROUND
Edit the Converter code to initialize the GENDIRCOUNT variable. The source code to the Converter application is included with the Professional Edition of Visual FoxPro. The following step-by-step procedure illustrates the method to correct the error.
Step-by-Step Workaround
- Open the Convert.pjx project located in the Tools\Convert directory.
- Select the Code tab. Drill down to view the Program, and select the Convert program. Click the Modify button to edit the file.
- On the Edit menu, click Find, and in the Look For area of the dialog box, type FUNCTION AddMethods. Click Find. The Addmethods method is the one to modify.
The second line of code in the Addmethods method is this LOCAL statement:
LOCAL cTmp, savearea, gendir, m.newmethod2
Add the GENDIRCOUNT variable to this statement. It should now read:
LOCAL cTmp, savearea, gendir, m.newmethod2, Gendircount
- Close the Program, and save changes. Rebuild the Converter application.
- In the Project Manager, click the Build button, and then click Build Application. The Save As dialog box is displayed.
- In the Save As dialog box, select the main Visual FoxPro directory (VFP).
- Click Save. The new application is built in your VFP directory.
You can verify the value of the _CONVERTER system memory variable to ensure that it points to the correct location of the application.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual FoxPro 3.0b for Windows.
MORE INFORMATION
Steps to Reproduce Problem
In FoxPro for Windows, version 2.6, issue this command:
CREATE SCREEN
In the screen's Cleanup code, place this code:
#REGION 1 Mvar1=2 #REGION 2 Mvar2=3
- Save the screen.
- In Visual FoxPro, on the File menu, click Open, and try to open the screen as a form.
- The Converter is invoked. Select Functional Conversion, and Click the Continue button. The error is displayed and the screen is not converted.
Additional query words: 3.00 VFoxWin Fixlist3.00b buglist3.00
Keywords: kbbug kbfix KB134620