Followup: Weakref - details
ATS
asteinarson at gmail.com
Sun Feb 10 06:29:47 PST 2008
>
> I wonder if it would also work if we use "class __multiple_inheritance
> wxEvtHandler;" when we forward-declare it? It would be great if you could
> test this as it seems to be like the least intrusive workaround.
>
> A> I don't use eVC but was guessing that the same would be possible there.
>
> From eVC help file it does support these options and it also supports
> #pragma pointers_to_members(multiple_inheritance) and
> __multiple_inheritance keyword.
The thing is, with eVC you would be casting to a "pointer to wxObject member
function". That's a single inheritance class.
When we use a "pointer to wxEvtHandler member function", we get a more
general pointer (larger), so we can handle both single & multiple
inheritance. By moving to wxEventFunction we are prepared for both
cases (and option "/vmm /vmg" sets all member function pointers to
this larger size).
Using wxObjectEventFunction for eVC, I can't see its possible to avoid
the extra compiler options. (It's like trying to fit an int into a short).
> A> > I must be missing something but what message exactly will he get?
> A>
> A> Weak refs untested on eVC and that "/vmm /vmg" could help getting it
> A> to work.
>
> What I meant to ask was where would this message be coming from. If we add
> it to wx/event.h as a #pragma message it will be triggered by all code
> which will be worse than annoying. Do you see a better alternative?
How about setup.h, as a comment, where the wxUSE_WEAKREF option is defined?
Or if there is a port specific README.TXT (for WinCE).
Also, are you sure this compiler error still exists? I was searching for
some mention of it elsewhere but with no result.
It's a compiler bug, and ought to be fixed.
Regards
// ATS
>
> Thanks,
> VZ
>
More information about the wx-dev
mailing list