Hi,

this one has to do with my limited C++ skills again: I'm looking for an
easy solution for all my wxWindow objects to run some custom code in C++
whenever their wxWindow::Destroy() method gets called.

The classic approach would be to create a new class derived from wxWindow
that overrides wxWindow::Destroy to first run the custom code and then
call the destructor. 

But how should I do it in wxLua? If I'd derive a whole new class from
wxWindow I'd have to create new bindings for it etc. This all sounds
quite complicated so I'd to know if there is an easier way to hook into
the wxWindow::Destroy method for every wxWindow object created by
wxLua.

Connecting to wxEVT_DESTROY is probably not sufficient because AFAICS
destruction is already in process when this event is sent, but I'd
like to run my custom code *before* the destruction process is actually
started.

Thanks!

-- 
Best regards,
 Andreas Falkenhahn                          mailto:andr...@falkenhahn.com


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to