FIX: Error Loading File When Converting a 2.6 Form in VFP 6.0
ID: Q195514
|
The information in this article applies to:
-
Microsoft Visual FoxPro for Windows, version 6.0
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.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
This bug was corrected in Visual Studio 6.0 Service Pack 3 for Options Groups.
This problem was not corrected for Invisible Buttons.
For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:
Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why
Q194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
MORE INFORMATIONSteps to Reproduce Behavior
- In FoxPro for Window 2.6, create a screen, place a radio button on
the screen, and save the screen.
- Open the 2.6 screen in Visual FoxPro 6.0. When Visual FoxPro prompts you
for a conversion, select functional conversion.
- After conversion, the following error message appears:
Error loading file - record number 5. opgOpt1 <or one of its
members>.ColorSource: Expression evaluated to an illegal value.
- To open the form in Visual FoxPro 6.0, open the .scx as a table with the
USE command, for example:
USE myscreen.scx.
- In the command window, perform a BROWSE, go to the Properties column of
the offended record (as described in the error message), and double-
click to open the memo window.
- Change the ColorSource value from 3 to 4.
- Save the changes, and close the table.
- Open the form in Visual FoxPro 6.0.
Additional query words:
Keywords : kberrmsg kbContainer kbCtrl kbMiscTools kbVFp600 kbVFp600bug kbVS600sp3fix
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbbug
|