Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Forms referred to in other forms
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Forms referred to in other forms
Divers
Thread ID:
00044440
Message ID:
00044440
Vues:
60
This is related to another question that appeared here recently. I have two apps in which, in the main.prg, I DO FORM form1 WITH variable1 and then READ EVENTS. form1 is like a main menu. A button.click in form1 has THISFORM.Hide, then DO FORM form2 WITH variable2. In the click for a grid (or textboxes in the columns) is, similarly, THISFORM.Hide, then DO FORM form3 WITH variable3. form2.Unload has form1.Show, and form3.Unload has form2.Show. Since form1, form2, and form3 are the filenames of the .SCX files, and should therefore be the default object names, I have not used the NAME clause of the DO FORM command. My question is: why does app#1 work and app#2 give me an "Unknown object" error when I try to unload form3? What could be different about them? I have tried using the NAME clause of DO FORM in app#2, to no avail. But I didn't seem to need NAME clauses in app#1 anyway.

I suppose I do as Mr. Pikman suggested to someone and loop through _SCREEN.Forms(), looking for _SCREEN.Forms(x).Name, which I realize is the name property of the form, not the name of the form object (yes, I checked that). Perhaps that would be more secure anyway. But since form3 is only started from form2, and form2 only from form1, I shouldn't have to go searching like that, should I?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform