Re: [wxPython] Hooking into the window destruction sequence
by Matthew Sherborne other posts by this author
Apr 29 2002 9:58PM messages near this date
Re: [wxPython] Hooking into the window destruction sequence
|
Re: [wxPython] Basic Grid rendering questions
Hooking into the window destruction sequenceHave you tried overriding =
__del__?
I had a similar problem and sometimes overriding __del__ worked, but in =
that case they must be destroyed by python code, (not just the C++ class =
bieng destroyed).
In the end for me, I used the Destroy (or EVT_CLOSE) of the top level =
parent (the wxFrame) to clean up all the child objects.
I think you have to do cleanup in the code that destroys the panel, not =
in the panel class itself. But maybe I'm wrong...
Matthew Sherborne
----- Original Message -----=20
From: Jeff Kotula=20
To: 'wxpython-users@lists.wxwindows.org'=20
Sent: Friday, April 26, 2002 5:33 AM
Subject: [wxPython] Hooking into the window destruction sequence
I would like to hook some cleanup code into the window destruction=20
activities such that when a wxPanel-derived class is destroyed=20
(from whatever cause) the cleanup code is executed. I've tried=20
overriding the Destroy() function but that doesn't seem to be=20
executed when the parent widget is destroyed.=20
Any help with this would be greatly appreciated. If I can't do this, =
then=20
the cleanup code must be done explicitly by any and all clients of=20
my panel and in my environment that is sub-optimal. Thanks!=20
=
-------------------------------------------------------------------------=
------------=20
Jeff Kotula Sr. Principal Software Engineer=20
Vital Images jkotula@vitalimages.com=20
Renunciation is not giving up the things of this world,=20
but accepting that they go away.=20
-- Suzuki Roshi=20
Attachments:
unknown1
Thread:
Jeff Kotula
Robin Dunn
Matthew Sherborne
Robin Dunn
Robin Dunn
Bernhard Herzog
Bernhard Herzog
Mike C. Fletcher
Steve Holden
|