Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object form1 is not found
Message
 
To
05/11/2002 17:40:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00718704
Message ID:
00719376
Views:
12
>>*** 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
Previous
Reply
Map
View

Click here to load this message in the networking platform