Gtk::TreeSelection problem (redux)



Please ignore my previous and incomplete post.


    int n = m_refFileSelection->count_selected_rows ();
    if ( n == 1 ) {
        Gtk::TreeIter iter = m_refFileSelection->get_selected ();
        if ( iter )  {
            m_refFileSelection->unselect ( iter );
        }
    }

and

    int n = m_refFileSelection->count_selected_rows ();
    if ( n != 0 ) {
        m_refFileSelection->unselect_all ();
    }

Both of these code snippets generate the following two error messages when the if-test is satisfied:

Gtk-CRITICAL **: gtk_tree_store_get_value: assertion 'VALID_ITER (iter, tree_store)' failed GLib-GObject-CRITICAL **: g_value_get_string: assertion 'G_VALUE_HOLDS_STRING (value)' failed

Is this reasonable?


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