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:
00052451
Views:
28
>>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.

Makes sense.
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Previous
Reply
Map
View

Click here to load this message in the networking platform