FIX: Error Loading File When Converting a 2.6 Form in VFP 6.0 (195514)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q195514 SYMPTOMS
When you open a converted 2.6 form in Visual FoxPro 6.0, the following
error message appears if the converted 2.6 form has a radio button control
or a line object:
Error Loading File - record number<n>...ColorSource: Expression
evaluated to an illegal value.
CAUSE
The value three (3) is assigned to ColorSource for both the option group
control and the line object during the conversion. A ColorSource property
of three is invalid for both of the controls in Visual FoxPro 6.0.
Invisible buttons have this problem, too.
Shape objects might also have this problem.
RESOLUTION
There are at least three methods for resolving this problem. They are
listed below. NOTE: Before attempting any of these resolutions, back up your
files.
Method 1- Open up the form file (.scx) as a table.
- Go to the Properties column of the offending record, and change the
ColorSource value from three to four.
For further information, refer to step 4 in the following Steps to
Reproduce Behavior section.
Method 2
This method works for Invisible Buttons as well as Option Groups.
Modify the Convert.app as follows:
NOTE: The source code for Convert.app is located in the
..\VFP98\Tools\Convert folder.
- Open the Convert.pjx and click the Other Files tab.
- Under Text Files, open the convert file. This is a header file (.h) that
defines constants used in the Convert.app.
- Search for I_DEFCOLORSOURCE. Your search should find the following line:
#DEFINE I_DEFCOLORSOURCE 3&& default color source
- Change the 3 to a 4, and save and close the file.
- Rebuild the Convert.app from the Project Manager.
- Copy the new Convert.app to the ..\VFP98 folder. Be sure to verify that
the _converter system memory variable points to the correct file. You
can also check this in the Options dialog box by clicking the File
Locations tab and looking at the path listed under Converter.
Method 3
Use the Visual FoxPro Transformer application.
NOTE: This is probably the best solution because other aspects of converted
forms can be changed with the Transformer, many forms at one time. The
Transfrm.app is located in the ..\VFP98\Tools\Transfrm folder.
Note that as the Help file states:
"The Transformer is not supported by Microsoft Support Services
either electronically or via telephone."
To learn more about the Transformer, go to the Transformer topic in Visual
FoxPro Help. "Help Transformer," without quotes, typed in the Command
window should bring it up.
To use the Transformer to resolve the problem described in this article,
follow these steps after doing a Functional conversion on the form(s):
- Run the Transfrm.app. It might be easier to copy it to the VFP98
directory first and use DO HOME()+"transfrm.app" to start it.
- On the Files tab, add your .scx file or the directory that contains the
.scx files that need transformed.
- In the Rules tab, fill in the following:
Property: colorsource
Value: 4
Files: *.scx
Classes: OptionGroup
- Click Add to add this rule. Do the same for Invisible Buttons and Line and Shape objects if
the converted forms contain them.
- To save these rules for use at a later time, click the save button and
type a table name.
- On the Log tab, deselect the Create Log Only check box and click
Transform.
- The converted form(s) should now open without errors.
Modification Type: | Major | Last Reviewed: | 10/15/2002 |
---|
Keywords: | kbBug kbContainer kbCtrl kberrmsg kbMiscTools kbVS600sp3fix KB195514 |
---|
|