Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Activate vs init.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00052234
Message ID:
00052433
Vues:
35
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform