Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Include file in Load event v. Form Include File
Message
De
29/04/1998 11:49:29
 
 
À
29/04/1998 03:11:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00095500
Message ID:
00095694
Vues:
18
>>I had used the #Include command in the load event of my form and kept getting an error that a variable couldn't be found. I looked at several threads relating to this problem, and the consensus seemed to be that the problem was because the #Include command was a compiler directive. Like the guy who had the original problem, I had compiled my form (using compile form), even though according to the help file, it appears to happen automatically when you save the form. Nonetheless, when I use Form->Include File, then run the form, everything works fine.
>>
>>So my question is: what accounts for the difference?
>>
>>I double checked the path in the Load event (I hard coded as a test to make sure). I don't get any kind of error message from the Load event telling me it couldn't find the file, so I am baffled.
>>
>>Has anybody else had this happen?
>>
>>Thanks,
>>
>>Sylvia
>
>Where are you using a constants defined in include file?
>
>If you put the #Include directive in the Function/Procedure/Method/Event body,
>the constants defined in that file available only in this Function/Procedure/Method/Event!
>
>Alexander

I was trying to use these constants (the ones defined in the include file) for messages on the form itself. That's why I thought adding the code to the #Include in the load event of that form would be kosher. Example: I wanted to include a message in the valid event of fields on this form that says (if empty) "Hey, you can't have a blank field."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform