Re: C++ and glue/gmodule



On Mon, 2006-08-14 at 18:25 +0200, Johannes Schmid wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi!
> 
> OK, anjuta does now receive the type but it uses gtkmm__AnjutaPlugin and
> generates a general Anjuta::Plugin instead of the SampleCpp class
> derived from Anjuta::Plugin!

Your SampleCpp needs to also call the ObjectBase constructor with a
type. Actually, only the most derived classes need to do this.

> The problem is that I have only found examples where the constructor of
> Glib::ObjectBase is called to receive a new custom type. But the
> constructor is never called before the type is needed in my case.

Ah, yes, those functions called get_type() to instantiate the type. I
guess you could instantiate an object and then call object.get_type().
It's not very efficient but maybe it's OK.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]