[Mono-dev] Embedding + GObject Subclasses

Matthew Metnetsky met at uberstats.com
Wed Sep 2 18:16:46 EDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

All,

Suppose I had the following class:

class Foo : Gtk.Box
{
  public new int Spacing {
    Console.WriteLine("HI");
    return base.Spacing;
  }
}

which is compiled into Foo.dll. Is there a way from within a native
application to instantiate Foo via it's GType like:

GObject * o = g_object_new(FooType, NULL);

So in other words, I have mono embedded and was wondering if there is a
way to make use of sub-classing GObject succinctly execute MonoMethod's.

Thanks!

~ Matthew
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqe7skACgkQLrcoBjlTBf19ewCeJU01Hw8G3OpRwCDvlDco6O86
fqIAoKDfWRDMG1mhqs6kVDZAncnibkZO
=TlbI
-----END PGP SIGNATURE-----


More information about the Mono-devel-list mailing list