@jbacelar wrote:
Hi.
I'm building two ofxUI dropdown menus in the same program:
First one get menu names from a vector via push_backs in the setup.
Second menu get toggle names (name2) from a set that comes from reading a CSV file and filtered by the fist menu selection:string name2 = e.widget->getName();
ofxUIToggle *toggle2 = (ofxUIToggle *) e.widget; ddl2->setShowCurrentSelected(toggle2->getValue()); if(g_img_N == 1 && g_changeMenu == true) { // choices from menu1 ddl2->clearToggles(); string addnames=""; std::set<std::string>::iterator it_names = RArtLar.v_setRamos.begin(); // iterate names from the class's vector for(int i=0; i< RArtLar.maxElements; i++){ // adding elements addnames += *it_names; ddl2->addToggle(*it_names); it_names++; } g_changeMenu = false; } ofxUIDropDownList *ddlist2 = (ofxUIDropDownList *) e.widget; vector<ofxUIWidget *> &selected2 = ddlist2->getSelected(); vector<string> seleNames = ddlist2->getSelectedNames(); // this line adds THE PROBLEM!
when I select toggle names in the application it crashes :
EXC_BAD_ACCESS(code=exci386_GPFLT)even using getName();, like the menu1 method..
just kind of lost here ...thanks in advance.
Posts: 1
Participants: 1