Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form is there...but isn't there?
Message
From
14/07/2003 14:18:50
 
 
To
14/07/2003 13:49:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00809913
Message ID:
00809931
Views:
43
Hello

Every form has an variable associated with it. As long the variable is visible, the form is accesible through it's name (in your case, the form and the variable are named 'profile'. Variable is created in the click of the button. Because the form 'profile' is modeless, it is created then the code in click continues and finishes. As soon as it finishes, the variable goes out of scope and it doesn't exist anymore. The form has a life on it's own, and you see it on the screen and can interact with it, but it is innacessible through it's variable's name. I really hope you'll get my point ;)

Try to run the form with DO FORM profile LINKED and you'll see it briefly flashes on the screen and then goes out (as the variable does).

To avoid that you have to ways: a) to make the profile form modal, or b) to make the variable visible in some way, such as declaring it public:
public profile
do form profile
and releasing the public variable afterwards.

Hope this helps.

>Hi...
>
>I have another problem....
>
>I have a form (main.scx)....with a button on it...when this button is clicked, another form appears (listing.scx) with a listbox on it. When a record in the listbox is double clicked, the listing form closes and another form appears (profile.scx). This form has two pageframes on it; when the 'tab' of one pageframe (details) is pressed, the code switches the focus to a tab on the other pageframe (actions).
>
>The 'profile' form works fine if it is called alone. However, if it is called thru the process I describe, and I click on the tab to change the other pageframe(details) I get an error saying 'profile is not an object'. Yet it has already displayed the form!
>
>What have I messed up?
>
>CM
Grigore Dolghin
Class Software.
Previous
Reply
Map
View

Click here to load this message in the networking platform