clearing or resetting the popdown strings of a Gtkmm Combo box



 
I have a series of combo boxes that a change in one needs to update the contents of the next one.
 
I fill each combo like this:
 
std::list<Glib::ustring> combo1Strings;
combo1Strings.push_back("string1");
combo1Strings.push_back("string2");
 
pCombo1->set_popdown_strings(combo1Strings);
 
I then catch the "on_changed" signal for pCombo and in that handler, try and reset the contents of
a second combo box in the same basic way.
 
void CMyClass::on_Combo1Changed()
{
    std::list<Glib::ustring> combo2Strings;
    // call out to build the correct contents, based on state of combo1
    BuildCombo2Strings(pCombo1, combo2Strings);
    pCombo2->set_popdown_strings(combo2Strings);
}
 
 
What happens is that everytime I change pCombo2's drop down strings, it works in the application, but
the terminal window running the application logs the following:
 
Gtk_CRITICAL **: gtk_combo_set_popdown_strings: assertion 'strings != NULL' failed
 
I have tried several approaches from calling "get_popdown_strings", clearing it and resetting it in, and
accessing the C object for the combo and passing NULL as the string list ptr.
 
Can't get the assertion to go away.
 
How do you either clear or reset the pop down strings for a Gtkmm combo box?
 
--Bob
 


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