Miscellaneous Errors FAQ’s

What is this "Variable not found" error I’m getting? I don’t recognize the variable name.

If you get errors like "Variable ‘INIFILE’ is not found" or "Variable ‘MB_ICONQUESTION’ is not found", the variables are compile-time constants. These constants, that exist within the code being run at the time the error occurred, should have been converted to their defined values when the object was compiled. The error occurs because the constant was not converted when the object was compiled, leaving the constant name in the compiled code. When this code is then run, VFP thinks the constant name is the name of a procedure or memory variable, which does not exist. To fix the problem, there are a couple of things to try:

Open the Project Manager through its option on the Tools menu. Click the Build button and select the Recompile All Files checkbox before building the application. This should convert the compile-time constants in all objects.

If the error is occurring in a form or class, open the form or class in the Form Designer or Class Designer, respectively. Then, for the form or class, make sure the MAIN.H include file is specified in the Include File option on the Form or Class menu, respectively. You’ll find MAIN.H in the directory where you installed VPM.

Why do I get a "Cannot update the cursor" error when I build my application?

When this happens, there are usually references to the AppForms and/or AppCtrls class libraries instead of the VPMForms/VPMCtrls class libraries in the project's "Pro" classes. To fix this, open each "Pro" class library file in the project's home directory as a table and search the CLASSLOC field for an "App" class library reference. The references should be changed to either VPMForms or VPMCtrls as appropriate. Once fixed, you should be able to remove the "App" class libraries from the Project Manager and rebuild.

Nobody has been able to tell us exactly what they did prior to this problem arising so we don’t know its exact cause. It probably has something to do with modifying the project’s classes while in VPM. Therefore, we suggest that you make modifications to the project’s classes while not in VPM.

More:

Miscellaneous How To FAQ's