4

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

23ars
  • 174

1 Answers1

2

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.

jplatte
  • 1,290