Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to destroy an object
Message
From
19/10/2006 08:46:08
Mike Sue-Ping
Cambridge, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01163089
Message ID:
01163254
Views:
12
>>I have a grid on a form that will create and show a search object in its keypress event. The form also contains a close button. When I select the close button, the form will not destroy when the search object is showing. I have to release the search object before the form will close.
>>
>>My question is, since the search object is created by the grid and a reference to the search object is stored to a custom grid property, what event/method can I tap into when the form tries to close in order to release and destroy the reference to the search object?
>>
>>TIA
>>Mike
>
>Destroy Event of the form, you could put there:
>
>IF PEMSTATUS(thisform.Grid1,[MySearchObject],5)
>   *** Execute sume clear methods of the object if you need
>   thisform.Grid1.MySearchObject = NULL
>ENDIF
>
Thanks Borislav. I'd accidently started this message in the wrong category and had moved it to Object Oriented Proramming. I could not figure out how to remove it from this category.

Anyway, I've found a solution that is similar to what you've suggested.

Thanks again,
Mike
Previous
Reply
Map
View

Click here to load this message in the networking platform