Re: libanjuta interface problems again
- From: Johannes Schmid <johannes schmid gmx de>
- To: Johannes Schmid <johannes schmid gmx de>
- Cc: GTKmm List <gtkmm-list gnome org>
- Subject: Re: libanjuta interface problems again
- Date: Sun, 08 Oct 2006 16:11:46 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi!
OK, I should have RTFM! Anyway, if I add a call to add_interface() in
the constructor I don't get the casting critical but the program crashes
because it does not find my implementation of the interface.
Looking through the Gtkmm source code I have seen that all interfaces
have WRAP_METHOD and WRAP_VFUNC for all functions. Is this the correct
way to do it?
Regards,
Johannes
Johannes Schmid wrote:
> Hi!
>
> Investigating this a bit further I found out the the interface types are
> not registered in wrap_init.cc. Is this the intention?
>
> Regards,
> Johannes
>
> Johannes Schmid wrote:
>>> Hi!
>>>
>>> I have now finished most of the wrapper except the signals because
>>> generate_extra_defs seems to be quite bad on GInterfaces but I ran into
>>> another Interface problem.
>>>
>>> In C++, to implement an interface you would write:
>>>
>>> class MyPlugin : public Anjuta::Plugin, public IAnjuta::Interface
>>> {
>>> public:
>>> void my_interface_impl();
>>> }
>>>
>>> But at the point where the underlying C code wants to call this
>>> interface it fails because it tries to cast and fails:
>>>
>>> (anjuta:28301): GLib-GObject-WARNING **: invalid cast from
>>> `gtkmm__AnjutaPlugin' to `IAnjutaWizard'
>>>
>>> ** (anjuta:28301): CRITICAL **: ianjuta_wizard_activate: assertion
>>> `IANJUTA_IS_WIZARD(obj)' failed
>>>
>>> How it this supposed to work?
>>>
>>> BTW, the code can be viewed at
>>> https://svn.sourceforge.net/anjuta/libanjutamm
>>>
>>> Thanks and regards,
>>> Johannes
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFKQci7Dsf+G5b/WsRAtpoAJkBuEgMGdly2c/DmYisc9oYGZTWuwCfbN5P
Fjmgy/zZc4spBKm9lWz8eXE=
=Rptg
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]