Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refering to objects
Message
De
22/12/1999 00:01:42
 
 
À
21/12/1999 13:12:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00306427
Message ID:
00307139
Vues:
38
>It does it in my application (an executable) and from the command line.

Did some testing, and found what I thought to be true:

When you call a form from the command window, VFP declares the variable that references the form PUBLIC. This is the same as any other variable created in the command window.

When you run a form from another form, or from a prg, the variable that is created is private by default: that means it is in scope in all subordinate procedures until that procedure finshes. If you use the LINKED clause, your form will be released when the calling procedure finishes executing. Using the NAME clause does nothing more than assure that you know the name of the variable that VFP creates when you call the form.

I think that your test method has skewed your impression of what is happening. If you ever called the first form from the command window, than its variable got scoped PUBLIC, and was not destroyed. Subsequently calling the form from a prg assigned the form to the same variable, which was already public, this showing up in the debugger.

Did I just confure things more?
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform