Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you declare a FORM public?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00044717
Message ID:
00044925
Vues:
33
Actually, DO FORM X NAME X LINKED can be different. Usually, though, you would declare a public variable in your app, say oThisForm. Then, when you issue DO FORM x NAME gcThisForm LINKED, you can reach form x anywhere in your app by reference to the variable. And you can release form x by issuing oThisForm = "" which removes the object reference.

Putting forms in on the fly as Ed does is interesting, reminiscent of what Lisa (Slater Nichols) does in her MasterClass framework. Having a public reference to a form can be useful where you always want to be able to get to a specific form for a particular reason.

Hank


so DO FORM myform and DO FORM myform NAME myform
>should be equivalent (somebody please tell me if they're not). I don't understand why, but even though _SCREEN.myform doesn't seem to help with scope, you can always do as we've been advised and loop through _SCREEN.Forms(x), for x = 1 to _SCREEN.Formcount, looking for _SCREEN.Forms(x).Name = yourformname, which is the name property of your form as seen in your form designer, and not the form object name.
>
>As soon as I formulate the question in my mind better, I plan on making a new thread in which I ask about the best OOP way to manipulate all the forms in my app. It probably has to do with keeping properties in the application object to keep track of them. DOing FORMs from other forms, tree style as I do, is different from ol' TASTRADE and can pile up forms in memory.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform