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



On Mon, 2010-11-08 at 13:27 +0100, Krzesimir Nowak wrote:
> On Fri, 2010-11-05 at 13:52 +0100, Murray Cumming wrote:
> > 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.
> 
> Thanks, that helped indeed. But for now I didn't commited your fix to
> git, because of some still unresolved problems with reference counting
> in completion stuff.

Check your vfuncs. That's what I would suggest at first. You can try
commenting them out completely to check if they are the problem.

I notice that you have some conversions for vfuncs or signals in the
main .m4 convert file, but you should really put them in the .hg files
to avoid using them for regular methods and to make sure that they use
the correct reference counting.

> > 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]