Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error : Illegal redefinition of variable
Message
De
25/07/2013 10:42:27
Mk Sharma
Shrishti Solutions
Mumbai, Inde
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01579124
Message ID:
01579207
Vues:
46
Please send me a example class of this kind to understand the working.

My email ID : mk_common@yahoo.com

Warm regards,
mk.



>>Thank you,
>>
>>The problem was Private Variable.
>>
>>We can declare a Public variable as Local OR as Public as much time we want.
>>But we can not declare a Private as Local OR Public
>
>I didn't see you already solved it. But just for the thought of it, (or depending how large your project is you can refactor), you may think to do it differently in the future.
>Instead of creating numerous public variables you can create one class with those variables as properties in this class. Then you can instantiate this class as PRIVATE in the main.prg (or make it public if you feel more comfortable).
>In the code then you can refer to the object and get it's properties, which now serve as kind of "public variables".
>For instance in the main prg:
>
>PUBLIC goPublicVariables
>goPublicVariables = NEWOBJECT("PublicVariables", "AppClasses.vcx")
>
>And in the code where you use those variables:
>
>LOCAL loPublicVariables AS PublicVariables OF AppClasses.vcx
>loPublicVariables = goPublicVariables
>Messagebox(loPublicVariables.OldProduct)
>
>This way you can also add comments to those properties and see the available variables in intellisense, making it easier when you have to refer to them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform