Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Include file
Message
 
 
À
03/10/2007 20:22:21
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01258255
Message ID:
01258696
Vues:
21
This message has been marked as the solution to the initial question of the thread.
Jay,

After looking over your code, I found the problem is that the header file also needs to be #INCLUDE'd in emps_registry.prg. This is because certain statements in the Registry class definition that is part of that prg reference constants that are defined in the header file. If the header file is not included when you compile emps_registry.prg, the names are not recognized as constants and are therefore treated as variables at runtime.

Header files must be explicitly included in every program, form, and vcx-based class that references any of the constants DEFINEd in them. Just to be clear, #INCLUDE statements are not "called" at runtime; they take effect at compile time and tell the VFP compiler to replace the name of each defined constant with its literal value. If the compiler is not told to include the header file, the names are treated as variables at runtime, which causes an error if a variable by that name does not exist.

-Rick


>>>>I have a form that has an INCLUDE file. I added it through the Form menu. It does not seem to be working as the DEFINE values are not available in the INIT of my form during runtime.
>>>
>>>UPDATE: I've even tried putting all the files in one directory, but still no luck. If anyone has any interest in looking at this, I've zipped-up the project. Only a couple files and the only thing I'm trying to resolve right now is why the constants defined in the EMPS_Registry.h file are not available in the form's INIT in runtime. Let me know if you have an extra 10 minutes and I'll email the zip file to you. Thanks in advance!
>>
>>Jay,
>>
>>I don't know if you saw my earlier reply to you in this thread, but if the suggestions there did not help then go ahead and e-mail me your project and I'll take a look at it. Pls e-mail to the address on my UT profile as per the e-mail icon next to my name.
>>
>>-Rick
>
>Just sent it. Thanks!
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform