Re: How to use Glib::Interface derived interfaces in custom classes?
- From: Murray Cumming <murrayc murrayc com>
- To: Krzesimir Nowak <qdlacz gmail com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: How to use Glib::Interface derived interfaces in custom classes?
- Date: Fri, 05 Nov 2010 13:52:52 +0100
On Thu, 2010-11-04 at 20:14 +0100, Krzesimir Nowak wrote:
> (test:17365): GtkSourceView-CRITICAL **:
> gtk_source_completion_add_provider: assertion
> `GTK_IS_SOURCE_COMPLETION_PROVIDER (provider)' failed
This fixes the warning:
TestProvider::TestProvider()
: Glib::ObjectBase( typeid(TestProvider) )
{
}
You need to call the ObjectBase constructor with a custom type name in
order to actually register a custom GType. This is admittedly awkward.
We don't register a custom GType for all derived classes because it is
usually unnecessary and possibly problematic/inefficient and b) I don't
think we figured out how to do that. Maybe we should.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]