On 01/17/03 J. Perkins wrote: > How do I get "base.OnInit()" to call wxApp::OnInit()? The obvious, but > wrong, solution would be to have base:OnInit() call an unmanaged C > function like this: > > bool _App_OnInit(wxApp* theApp) > { > return theApp->OnInit(); > } > > But that will just end up in the _App::OnInit() virtual function again. > I think this is the last issue I need to resolve; I am hoping that > someone else has solved it before me.
I think the only portable way is to add a C function that will call a C++ helper function in the derived class, The latter can call base->method() safely, since the C++ compiler knows what to do in that case. This only works if you have control on the derived class and that would mean that, if you want to override a method in a C#-defined class that virtually derives from a class in C++ code, you need to make a helper class and derive from that. The Qt# folks may have found a different/better solution. Another solution is to integrate the ability to map between the CLR virtual table and the C++ virtual table to the mono runtime. This would be compiler-specific (and mono-specific), but it has already been done and it's possible the MS CLR runtime will support something like that in the future anyway (this is just my speculation, now that mono is catching up, they need to add some 'unique' feature to their runtime;-). lupus -- ----------------------------------------------------------------- [EMAIL PROTECTED] debian/rules [EMAIL PROTECTED] Monkeys do it better _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list