Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Losing Public Variables When Form Runs
Message
De
17/06/1999 20:28:10
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Losing Public Variables When Form Runs
Divers
Thread ID:
00231160
Message ID:
00231160
Vues:
47
How and why do I lose public variables every time a form runs its default activate method?

I'm trying to scatter memvar and have various object values set by the refresh method dependant on the value of those memory variables. I wrapped my head around why they should disappear when running any method - because they weren't public.

So I wrote a quick routine which explicitly makes public all the memory variables before I issue the first 'Scatter'. This works but the now public variables disappear regardless when the form's activate method is called, and they don't reappear on return from that call. So they are still not available when the refresh methods are called to fix the values of the relevant objects on the form.

I should point out that I'm doing this as a major exercise in converting a large 2.6 Dos application so I don't have the luxury of starting from scratch and achieving the same end in a different way (particularly by using data buffering rather than scattering). That'll have to come later. I should also point out that if I issue the scatter before the form is run (rather than as part of its load event) then I don't have the problem. I am, however, trying to take piecemeal advantage of the new way of doing things so I was trying to include that code with the form.

Any guidance gratefully snatched!

Harry
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform