- std::string text = wx2std(_lstValues[i]->GetLabelText());
- _model->setValueToInputPort(i,text);
+ std::string text = wx2std(_lstValues[i]->GetValue());
+ //TOFIX Search a better alternative
+ if(text!="--No editable--" && text!="--Port Connected--")
+ {
+ //JPRG: When executing, add double quotes if necessary
+ if(text.length()>0)
+ {
+ addDoubleQuotes(text);
+ }
+ _model->setValueToInputPort(i,text);
+ }
+ }
+ //handle box name
+ std::string boxname = wx2std(_boxName->GetValue());
+ if( boxname.compare(_initBoxName) != 0 ){
+ if (isValidNameForABox(boxname) == true){
+ if( _parent->boxNameExists(boxname) == true ){
+ closeok=0;
+ wxMessageDialog *dial = new wxMessageDialog(NULL,
+ wxT("The name already exists. Please provide another name"),
+ wxT("Change name: name already exists"), wxOK | wxICON_EXCLAMATION | wxSTAY_ON_TOP);
+ dial->ShowModal();
+ }else{
+ _model->setBBTKName(boxname);
+ }
+ }else{
+ closeok=0;
+ wxMessageDialog *dial = new wxMessageDialog(NULL, wxT("Please provide a valide name for your box (no spaces and only leters, digits, \"_\" or \"-\" allowed)"), wxT("Change name: invalid name"), wxOK | wxICON_EXCLAMATION | wxSTAY_ON_TOP);
+ dial->ShowModal();
+ }
+ }
+
+ if( closeok==1 ){
+ _parent->SaveTempActualDiagram("edit values");
+ Close(true);