Microsoft KB Archive/257702

= FIX: Form and Class Library Corrupted by Documenting Wizard =

Article ID: 257702

Article Last Modified on 8/7/2007

-

APPLIES TO


 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q257702



SYMPTOMS
Custom properties added to a form or class should display a value of nothing (None) in the design interface. Instead, there is a heavy bar character followed by some text. This text usually consists of the name of another of the form or class object's properties.



CAUSE
Within the "properties" field of the form's .scx file, or the visual class library's .vcx file, there is no trailing space following the equal sign (=) in the property's declaration statement. The form or class files are generated by the Documenting Wizard of any Microsoft Visual FoxPro version prior to Visual FoxPro 6.0 in Visual Studio 6.0 Service Pack 3.



RESOLUTION
It most cases, the problem can be fixed by using the form or class library file as a table and issuing a REPLACE statement as follows. For example, if the problem exists in a form named Form1, perform the following: USE form1.scx REPLACE properties WITH STRTRAN(properties,"="+CHR(13),"= "+CHR(13)) This can also be repaired by running the Documenting Wizard shipped with Visual Studio Service Pack 3. The generated code has the necessary space after the equal sign for customer properties where the value is nothing.

NOTE: Always save backup copies of your project code before processing it through the Documenting Wizard.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in the latest service pack for Visual Studio 6.0.

For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That a Visual Studio Service Pack Is Installed

To download the latest Visual Studio service pack, visit the following Microsoft Web site:

http://msdn2.microsoft.com/en-us/vstudio/Aa718353.aspx



MORE INFORMATION
Visual FoxPro 6.0 processes forms and classes differently than previous versions of the product. As a result, the absence of the space after the equal sign (for a property with a value of nothing) did not result in a problem in those previous versions of the product. However, if such class or form code is ported over to Visual FoxPro 6.0, it will be problematic at design time and run time.

Steps to Reproduce Behavior

 * 1) Create a new form, and add a property called myproperty.
 * 2) Blank out the logical value, such that the property's value appears as (None).
 * 3) Close and save the form as test.
 * 4) Use the form as a table by typing the following into the Command window: USE test.scx


 * 1) Browse the .scx file, go to the third record, and then open the memo field named Properties.
 * 2) Remove the space after the equal sign in the line that reads myproperty =.
 * 3) Close the .scx table and open the form test in the design interface.
 * 4) Go to the bottom of the Properties sheet (on the All page) and note that the value of myproperty displays a heavy bar character, followed by Name = "Form1".

Keywords: kbbug kbfix kbvs600sp4fix kbvs600sp5fix kbwizard KB257702

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.