Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form contains common controls refuse to destroy
Message
De
12/07/1998 14:26:49
Juan Kh
Dataprop Technologies
Sungai Petani, Malaisie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00116620
Message ID:
00116627
Vues:
15
>>Hi there,
>>
>>I have a form with a treeview and listview controls. I'd coded the NodeClick method of TreeView to fill up the tree by adding 3 child nodes to all of the existing nodes (which had been added by form's init method). All work fine up to this stage. However, when I tried to call the node click method from the listview (by supplying the neccesary parameter, which is a "node" object), after the method execute, the treeview was filled up as if it were run by clicking on the node, fine. However, when I click on the close button of the form, the form fail to go away, and the close button was disbled then. This leave me no mean of exiting the form. I used the debugger to trace some of the event while shutting down the form, it seems that the event fires up to form.destroy, and it stops, no further than that.
>>
>>It would be great be somebody could give me some idea on this.
>>
>>Thanks,
>>juan
>
>Juan,
>
>It sound like you have a reference to either the fomr or one of its controls outstanding. Chcek your code to be sure that you release any object references when you are through with them. If you store any object references in the form's properties you have to NULL those references in the form's Destroy event to allow the form to be destroyed.

Hi Jim,

I declared the object reference using 'local' keyword. I though the method would do the cleanup for me upon exit. Is there any explicit rules I should follow when dealing with object references, though it is a local one?

Regards,
juan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform