Re: How to use Glib::Interface derived interfaces in custom classes?



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]