I am trying to write a simple(!) program for balancing my checkbook. I
have established a treemodel (listview) which works in terms of listing
the checks. But I would also like to be able to click on any row and
have a check's reconciled status indicated.
I believe I have copied the code from the tutorial, but it does not
work. I believe that the iter is not receiving a value.
Here is the code:
//Selection process?
Glib::RefPtr<Gtk::TreeSelection> refTreeSelection
=treeview.get_selection();
Gtk::TreeModel::iterator iter=(refTreeSelection->get_selected());
if(iter)
{
Gtk::TreeModel::Row row=*iter;
row[columns.col_reconciled]="done";
refTreeSelection->signal_changed().connect(sigc::mem_fun(*this,
&Reconciler::on_button_pressed));
};
etc.
As may be obvious, "treeview" is the name of the view. The signal
handler sets the text on a label. It will do this if it is not included
in the conditional routine (of if the initial condition is set to (!
iter), but otherwise not.
I suspect strongly that I am missing something obvious, but after
several days of fruitless effort, I still cannot see what it is.
Thanks for any help.
Andy Gilman
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list