Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Missing Class
Message
From
17/08/2000 01:41:19
 
 
To
17/08/2000 01:24:51
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00405938
Message ID:
00405943
Views:
31
Rodney,

>In the Main.prg of the project I'm working on, I get the error "variable 'varname' not found" on the line APP_GLOBAL = NEWOBJECT(APP_CLASSNAME, APP_CLASSLIB). I looked in my project classes and sure enough, APP_CLASSLIB does not exist.
>
>Is there any way to find APP_CLASSLIB and replace it?

Those 3 APP_WHATEVER's look like they're supposed to be constants, which are defined elsewhere with #DEFINE statements -- either at the top of the main.prg or in a separate file with ".h" extension which is referenced with a #INCLUDE directive.

So, either the #INCLUDE statement is missing or the .h file is missing.

For example, you might have a file called rodsapp.h that contains the following:
#DEFINE APP_GLOBAL oApp
#DEFINE APP_CLASSNAME myapp
#DEFINE APP_CLASSLIB appclass.vcx
Your main.prg might then have a line near the top:
#INCLUDE RODSAPP.H
At any point after that command, you can refer to APP_CLASSNAME and it will be translated to mean "myapp". This is done so that you can just change the settings in the .H file, recompile, and redefine the object reference name of the app class, its class, and class library without changing your program. This is often done to allow flexibility in frameworks.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform