[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
Re: [XaraXtreme-dev] XCode - built Mac Version will not display wxXtra SplashScreen
- From: Alex Bligh <alex@xxxxxxxxxxx>
- Date: Sat, 01 Jul 2006 09:31:34 +0100
- Subject: Re: [XaraXtreme-dev] XCode - built Mac Version will not display wxXtra SplashScreen
What I'm trying to work out is whether
a) FilterEvent's event has the wrong EventObject in; or
b) Whether it has the right EventObject in, but it is not yielding
the correct RTTI. As far as I know, RTTI should work right in
a constructor once all the base class constructors have been
called. This is clearly the case as wxAdvSplashScreen's own
derived constructor has been called.
I'd gone before your reply arrived.
On (a) isn't it sufficient that the 'this' pointer is the same -- have
I shown that it is the same? Am I missing something about C++ and
I don't think we've checked that the (consistent) this pointer ties
up with event.EventObject (i.e. what is being passed to IsKindOf() ).
i) I think that wxFrame is a base class of wxAdvSplashScreen, and
this is why its constructor is called before wxAdvSplashScreen's runs.
Ah. I was misreading the stack dump. I thought it was wxAdvSplashScreen's
constructor that was calling ::Create in wxFrame. Actually the "forked"
construction mechanism (i.e. calling ::Create is done at the wxFrame level),
so at the point it gets into the "Create" loop, wxFrame's constructor has
not completed, so the VFT pointer in the object is still pointing to a
wxFrame VFT and this is confusing the IsKindOf() stuff.
So I think I know how to fix this cleanly - do a separate call into
Frame's Create function rather than rely on wxFrame to do it, because
the VFT pointer by then will be set to wxAdvSplashScreen's VFT as the
underlying constructors will have exited even though Create() won't yet
have been called. I'll try to fix that up this PM.
It doesn't happen on GTK because window creation is partially deferred
as gtk doesn't create the windows synchronously.
ii) I need to check that RTTI is actually on
It's not C++ RTTI it's wxWidgets RTTI which is just a virtual method in
ii) I need to check that I am using the mac/carbon/frame.h