Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two forms
Message
De
18/06/2001 12:39:05
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
 
 
À
18/06/2001 11:53:08
Joao Godinho
Fredesenvolv, Lda
Lisbon, Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00520638
Message ID:
00520656
Vues:
15
>Hi, I have 2 forms in same time (form1 and form2). In form2 i click in botton to release the form1 example (form1.release) and the message error appears:
>
>"Object FORM1 is not found"
>
>Please help me
>
>thank you all

Form2 needs a reference to Form1 in order to access its Release(). You could store a reference, oForm1 as a property of Form2, then This.oForm1.Release(). The better, OOP-er/OOP-ish, way would be to have a collection (array) of forms used by your application. Then, you would call to the collection to release the form. That way, no form needs to know about any other form. It calls the object responsible for knowing about forms, the collection object.

In our framework, Mere Mortals, we have an oForms collection. In each form's Init(), it registers itself with the collection. Upon Release(), it unregisters itself. Then, if a form needs to reference another, we call oForms.Get('AnotherForm') and it returns either the reference to 'AnotherForm' or .NULL. if that form isn't currently available. Hope that helps,
---J
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform