Convert scenario details dialog and make numeric fields validate their contents

This commit is contained in:
2014-12-04 16:54:21 -05:00
parent d45a7d1c1b
commit ecd0867b65
23 changed files with 222 additions and 134 deletions

View File

@@ -676,8 +676,12 @@ template<> pair<string,cTextField*> cDialog::parse(Element& who /*field*/){
else if(name == "type"){
std::string val;
attr->GetValue(&val);
if(val == "num")
p.second->setInputType(FLD_NUM);
if(val == "int")
p.second->setInputType(FLD_INT);
else if(val == "uint")
p.second->setInputType(FLD_UINT);
else if(val == "real")
p.second->setInputType(FLD_REAL);
else if(val == "text")
p.second->setInputType(FLD_TEXT);
else throw xBadVal("field",name,val,attr->Row(),attr->Column(),fname);