Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Release all from method
Message
From
06/08/2009 18:28:18
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01416557
Message ID:
01416625
Views:
44
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform