On Sun, Aug 25, 2013 at 6:42 AM, Andreas Falkenhahn <andr...@falkenhahn.com>
wrote:
...
>
>
> What is confusing me here is this: The m_window pointer is always the
same but in each
> callback I get a different class name. How can this be? I'd expect to get
"wxFrame"
> in each callback but instead I get "wxFrame" only in the constructor. In
the other
> two callbacks it is "wxWindow" and then even "wxEvtHandler".... I don't
understand
> this. What is going on there?
>
The window is just being cast to different types, It looks like the
GetClassInfo() function is virtual, as defined in wxDECLARE_ABSTRACT_CLASS,
so it returns whatever the object is cast to at that time, which is what
you see. C++ doesn't really know what type any particular object really is.
The first case where the object is passed by wxWindow* pointer to the
wxLuaWinDestroyCallback seems odd, but it's a wxFrame that being passed in
and the wxWindow* arg doesn't really make a new pointer object, it just
passes the frame though it.
Regards,
John
------------------------------------------------------------------------------
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