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:
00719376
Vues:
13
>>*** 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).

Thanks for the insight!
Opportunity is missed by most people beacuse it is dressed in overalls, and looks like work --- Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform