FIX: Error in Converter: Variable Gendircount Not Found

Last reviewed: October 20, 1997
Article ID: Q134620
3.00 WINDOWS kbinterop kbfixlist kbbuglist

The information in this article applies to:

  • Microsoft Visual FoxPro for Windows, version 3.0

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:

   Variable 'GENDIRCOUNT' is not found

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

  1. Open the Convert.pjx project located in the Tools\Convert directory.

  2. Select the Code tab. Drill down to view the Program, and select the Convert program. Click the Modify button to edit the file.

  3. 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.

  4. 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
    

  5. Close the Program, and save changes. Rebuild the Converter application.

  6. In the Project Manager, click the Build button, and then click Build Application. The Save As dialog box is displayed.

  7. In the Save As dialog box, select the main Visual FoxPro directory (VFP).

  8. 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

  1. In FoxPro for Windows, version 2.6, issue this command:

    CREATE SCREEN

  2. In the screen's Cleanup code, place this code:

    #REGION 1 Mvar1=2

    #REGION 2 Mvar2=3

  3. Save the screen.

  4. In Visual FoxPro, on the File menu, click Open, and try to open the screen as a form.

  5. The Converter is invoked. Select Functional Conversion, and Click the Continue button. The error is displayed and the screen is not converted.


Additional reference words: VFoxWin 3.00 Fixlist3.00b buglist3.00
KBCategory: kbinterop kbfixlist kbbuglist
KBSubcategory: FxinteropPrevfox
Keywords : FxinteropPrevfox kbbuglist kbfixlist kbinterop
Version : 3.00
Platform : WINDOWS
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 20, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.