Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I try to develop a text editor in C++ and Gtkmm using Glade but I have a problem. When I try to run the program, I have the following message:"BuilderError: Invalid object type `GtkSourceView'". I supose this error come from the glade file but I'm not sure! This is a part of the Glade file:

<object class="GtkSourceView" id="text">
                <property name="visible">True</property>
                <property name="can_focus">True</property>
                <property name="left_margin">2</property>
                <property name="right_margin">2</property>
                <property name="show_line_numbers">True</property>
                <property name="show_line_marks">True</property>
                <property name="tab_width">4</property>
                <property name="auto_indent">True</property>
              </object>

And here is how I declared the source buffer and the sourceview:

Glib::RefPtr<Gsv::Buffer> textbuffer;
Gsv::View *textview;

Also, I must say that I use gtkmm 3.0, gtksourceview3.0 and glade3.8.0

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You have to have installed libgtksourceviewmm-3.0-dev to be able to use GtkSourceView (Gtk::SourceView) in gtkmm. To get the GtkSourceView widget in glade, you have to install libgtksourceview-3.0-dev, but it is in the depencies of the mm-package, so just do a

sudo apt-get install libgtksourceviewmm-3.0-dev

and it should work.

share|improve this answer
    
Neah, not working... same "BuilderError: Invalid object type `GtkSourceView'" problem... I have those libraries installed and I included them in the makefile but the same problem. Seems that I need another tag in glade file instead of <object class="GtkSourceView" id="justanid"> –  23ars Aug 18 '13 at 15:39
    
Did you create the file yourself? Why don't you use glade for that? Besides that, the object type "GtkSourceView" has to work, it is what glade writes into the file when adding a GtkSourceView in it. Perhaps the problem is not the glade file, but the code you use to build a UI from it. But for questions about that, you should better use StackExchange or the gtkmm mailing list. –  jP_wanN Aug 18 '13 at 20:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.