Re: GType stuff again!
- From: "Murray Cumming" <murrayc murrayc com>
- To: "Johannes Schmid" <johannes schmid gmx de>
- Cc: gtkmm-list gnome org
- Subject: Re: GType stuff again!
- Date: Wed, 20 Sep 2006 08:48:20 +0200 (CEST)
Please remember to CC gtkmm-list. I assume that you meant to.
> Some short code:
> In the plugin:
> extern "C"
> G_MODULE_EXPORT GObject* glue_constructor(GObject* shell);
> G_MODULE_EXPORT GObject*
> glue_constructor (GObject* shell)
> Anjuta::SampleCpp* plugin =
> new Anjuta::SampleCpp(Glib::wrap(ANJUTA_SHELL(shell)));
> std::cout << g_type_name(plugin->get_type()) << std::endl;
> return G_OBJECT(plugin->gobj());
>>> Here type is gtkmm_AnjutaPlugin!
> In the glue factory, the constructor is called using some g_module stuff:
> /* Create the object */
> plugin = (*constructor)(shell);
>>> Now I get GObject
> Looks all very strange to me!
Yes. Do try to simplify it by using G_OBJECT_TYPE_NAME(gobject) in both
parts, and check that it's really the same object, by printing out the
value of the pointer.
If you don't make progress, I can look at it some time if there are clear
instructions about how to reproduce it. For instance, what version of
Anjuta to build, what patch to apply, what to do in the UI to make this
murrayc murrayc com
] [Thread Prev