Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
#DEFINE
Message
De
01/09/1997 13:12:17
 
 
À
01/09/1997 11:39:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00047934
Message ID:
00047944
Vues:
27
#DEFINE is a compiler directive. IE: the constant exist string (TB_FORMDESIGNER_LOC in your case) is replaced in your code with its value ("Form Designer" in your case) before the compilation. So, in the compiled code, you cannot find the TB_FORMDESIGNER_LOC constant.

Usually, the error you have is generated when you don't include the .h files into your program/form/class. For programs, use #INCLUDE directive. For forms, go to Form menu and choose Include files (the same for classes). Be sure your programs/forms/classes are compiled after any modif you make. Usually, forms and classes are compiled by default when you modify them (I suspect a bug here, since I had several cases when VFP didn't compile). If you modify a .h file, VFP will not recompile all files that include that header (.h) by default. Just go to Build project and choose Recompile all.

If you know C, it's very easy to understand .h files, because it's the same thing (although, in VFP you can have only #DEFINEs into a .h).

HTH,
Vlad

>Hi,
>
>As a way to learn VFP, I am going thru TasTrade.
>
>I made some minor changes to the .H files and now cannot, for the life of me, figure out why constants are lost.
>
>#DEFINE TB_FORMDESIGNER_LOC "Form Designer"
>
>is found early on in STRINGS.h
>
>In TASTRADE's releasetoolbars procedure, an array is built referring to these DEFINE's as follows:
>
>this.aToolBars[1,1] = TB_FORMDESIGNER_LOC
>
>I consistently get this error:
>
>Variable 'TB_FORMDESIGNER_LOC' is not found
>
>When was this value lost and why ? Any way to monitor it in the debugger ?
>
>Your help would be greatly appreciated.
>
>Henry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform