Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Missing Class
Message
De
17/08/2000 01:41:19
 
 
À
17/08/2000 01:24:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00405938
Message ID:
00405943
Vues:
32
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform