Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Activate vs init.
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00052234
Message ID:
00052433
Views:
30
>If I declare some variable public, should this go in the init section of a form rather than the activate? Does the activat section get fired every time the form does something then finishes? The init only once?

Yes, it should go in the init section because when the init occurs when an object is created and variables that are created here will keep their values for as long as the form runs and those variables aren't used. Now, the activate accurs when a Form, FormSet, or Page object becomes active, meaning that if you change the value of your public variable switch to another form and comeback, your public variable will be overwritten and lose its intended value.
For every bug fixed, there is a bigger bug not yet discovered.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform