Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing object from form to form
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Passing object from form to form
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01501305
Message ID:
01501305
Vues:
152
Hi,

I have a Form 1 that has a couple of BIZ objects referenced in the Form 1 properties (e.g. thisform.my_biz_obj)

In a click method of a button (on Form 1) Form 2 is instantiated and the BIZ object references are passed to Form 2. In the INIT of Form 2 the BIZ objects are assigned to properties of Form 2 (e.g. the same name as in Form 1, thisform.my_biz_obj).

My question is, when Form 2 is released should I destroy the references of the BIZ objects? My concern is that if I set the property thisform.my_biz_obj of Form 2 to NULL it will destroy the BIZ object for Form 1 (which is not what I want). By the same token I don't want to end up with dangling references.

TIA for your help.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform