Re: c++ objects
- From: José Alburquerque <jaalburquerque cox net>
- To: Stu <nixo exprodigy net>
- Cc: gtkmm-list gnome org
- Subject: Re: c++ objects
- Date: Tue, 23 Nov 2010 01:17:21 -0500
On Mon, 2010-11-22 at 14:12 -0500, Stu wrote:
> 2) I want to make a list box, so I make a treeview and in glade I
> define a ListStore for it and it all comes up nice, but when I want to
> add to it, I have to create the C++ object representing the ListStore
> object so that I can add it, and I can't pull it out of gtkbuilder for
> a similar reason as #1: at compile time, the compiler can't possibly
> know about what gtkbuilder is going to do at runtime, so I can't code
> an add of an object that nobody defined for the compiler at compile
> time.
> It's the same problem this guy had:
> http://old.nabble.com/TreeModel-with-Gtk::Builder-td23419723.html
The answer to the question in the cited thread is that the model is not
being defined twice. See the Gtk::TreeModelColumnRecord docs[1] (the
paragraph about the class not containing any data). The
Gtk::TreeModelColumnRecord class is simply an interface that gtkmm uses
to be able to interpret the type of columns that a model has. It makes
accessing the columns of the model using the [] operator of
Gtk::TreeModel::Row easier.
[1]
http://library.gnome.org/devel/gtkmm/stable/classGtk_1_1TreeModelColumnRecord.html#_details
--
José
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]