Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Releasing form while references to contols exist
Message
 
À
26/06/1998 16:26:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00112066
Message ID:
00112105
Vues:
18
>I have an object that dynamically creates headers for list boxes. This object is placed on a form, and a property (pcListBoxName) is set to be the name of the list box to manage.
>
>The object also has a property that is an object reference to the same list box (EVAL(pcListBoxName)). My problem is that the form will not release. I think I understand what is happening:
>the form release sees that there is a reference to one of the controls on the form (the list box), and therefore refuses to destroy itself.
>
>I can code around this several ways (like by not keeping that object reference and EVALing everywhere, or specifically calling destroy() of the class with the reference), but it seems like there should be a better way.
>
>Any thoughts,
>Bob
Bob,

One way to handle this situation is to give your class a release method that nulls the object reference. In the form's release you can call the object's release.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform