Re: gtksourceviewmm



2010/10/16  <Mutawakil gmx net>:
> Hi everybody,
>
> I am getting this error when adding proposals to SourceCompletionProvider
> instance, for example in my SourceView class:
>
> testprovider = RefPtr<TestProvider>(new TestProvider());
> SourceCompletion* completion = get_completion();
> RefPtr<SourceCompletionContext> context = completion->create_context();
> context->add_proposals(testprovider,testprovider->proposals,true);
>
> error:
>
>  GtkSourceView-CRITICAL **: _gtk_source_completion_add_proposals: assertion `completion->priv->context == context' failed
>
>
> I am searching two days for now, and still no solution. How can I add proposals to my SourceCompletionProvider?
>
> Thank you very much.
>
> mutawakil

Hi,

Reading existing code using code completion is a way to go. Try
reading how this is done in gtksourceview completion test. [1] It is a
simple case, but maybe it will be enough for you. If not, try anjuta
[2]. Both are written in C, but C++ bindings stick closely to C API,
so converting it to C++ should not pose a problem. Note that probably
nobody uses completion C++ API, so it is almost completely untested.
If you think that you have found a bug, please file it in bugzilla
[3]. I'll see to it if time permits.

Thanks,
Krzesimir Nowak

[1] http://git.gnome.org/browse/gtksourceview/tree/tests/test-completion.c?h=gnome-2-30
[2] http://git.gnome.org/browse/anjuta/tree/plugins/sourceview
[3] https://bugzilla.gnome.org/browse.cgi?product=gtksourceviewmm


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]