Gtk::Treestore buildable appending data?



Dear all,

is this a place to ask gtkmm usage questions?

If so:
I am trying to append data to a GtkTreestore which is defined in a buildable description ui file.

I can successfully load the GtkTreeStore from the ui file, but cannot figure out how to add data to the store. The only way coming close (no complaints during compile) is

...
  auto treestore = m_refBuilder->get_object("treestore");
  m_treestore = Glib::RefPtr<Gtk::TreeStore>::cast_dynamic(treestore);
...
  auto iter = m_treestore->append();
  iter->set_value(0, Glib::ustring("test"));
...

The definition in the ui file is:
...
  <object class="GtkTreeStore" id="treestore">
    <columns>
      <column type="gchararray"/>
      <column type="gchararray"/>
    </columns>
  </object>
...


During runtime, however I get a lot of assertions, dealing with type issues as far as I understand, and nothing is displayed in the treeview widget.

Can anyone point me to a worked example please?

Thank you for caring,
Roland

--
__________________________________________
  _  _  | Roland Schwarz
 |_)(_  |
 | \__) | mailto:roland schwarz blackspace at
________| http://www.blackspace.at

Attachment: OpenPGP_signature
Description: OpenPGP digital signature



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