Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Release all from method
Message
De
06/08/2009 18:28:18
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01416557
Message ID:
01416625
Vues:
43
>Some variables are causing problems in a button method
>because stored values seems to interfer in the next time I click (is it possible ?)
>
>Release all or clear all, I can not use
>
>How can I release all from button method ?
>
>I have many variables in this method

By practice I declare all my variables as LOCAL scope. If you do not explicitly declare them then by default a variable is a PRIVATE scope. A LOCAL scope the variable is only 'active' when the method is called and destroyed automatically when completed. A variable that is PRIVATE persists until it's first time method is destroyed and it is visible by all subsequently called programs/methods.

Sounds like you have the methods in the Click called method as the same name as a previously active method and the scope is PRIVATE. I would make sure that all variables are explicitly defined as LOCAL.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform