Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object form1 is not found
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00718704
Message ID:
00719091
Vues:
17
This message has been marked as a message which has helped to the initial question of the thread.
>
>It helps, but we are not sure about creating the public variable. What is confusing is that the form1 launches and is present on the screen. The actions in controls on this form1 that launch other forms work. In the load event of the launched forms are references to values passed in hidden labels from form1. Click to keep plugging through the error messages and the called forms load and the data is there. So the errors are not fatal, just a drag.
>
>Thanks
>
>*** Update, Found it, Thanks. Declared the form public in the click event of the login form. All is working.
>
>Thanks again

Hello,

Just to make sure everything is clear: it's a matter of variable scope. Whenever one launches a form, VFP creates a variable with the same name which is used to reference that specific form. The problem is variable can go out of scope (if the form is launched from a method, the variable vanishes at the end of that method). But the form stays on screen, perfectly functional. This is not a bug, it's by design. If you want to link forever the form with the variable, you have DO FORM LINKED. In this case, the form releases when the variable goes out of scope. Try your original code with LINKED clause, and you'll see the form will dissapear as soon as the calling method finishes (and, somehow, this is the behaviour you'd have to expect).
Grigore Dolghin
Class Software.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform