Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Unfortunately, the destroy() for my list header object is never called. I'm guessing that the form tries to destroy the list first, but sees it cannot, so never calls the destroy of the list header.
I came up with one other idea, which is to place the list box and the list header into a container. The container could contain the object reference (I guess it actually won't need it since it knows the name of the list box).
I think my problem is stemming from the fact that my list header and list box do not necessarily share the same direct parent: they should really be inside a container that manages them both. I was trying to create a stand-alone list header that could be just dropped onto a form and attached to a list box, but maybe that's not the way to go.
Bob
>>>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
>>
>>Normal way is to clean up it in Destroy event:
>>Release This.pcListBoxName
>
>Sorry, it should be This.pclistboxname=.NULL.. TGIF :)
>Edward Pikman
>Microsoft MVP - Visual Foxpro
>C/S Specialist, Information Technology, BMI
>212-830-8346, 718-951-4913
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement