65{
66 wxString num = m_textCtrlNumerator->GetValue();
67 std::vector<double> numerator;
68 while(num != "") {
69 wxString rest;
70 wxString strValue = num.BeforeFirst(' ', &rest);
71 num = rest;
72 double value = 0;
74 _("Value entered incorrectly in the field \"Numerator parameters\".")))
75 return false;
76 numerator.push_back(value);
77 }
78
79 wxString den = m_textCtrlDenominator->GetValue();
80 std::vector<double> denominator;
81 while(den != "") {
82 wxString rest;
83 wxString strValue = den.BeforeFirst(' ', &rest);
84 den = rest;
85 double value = 0;
87 _("Value entered incorrectly in the field \"Denominator parameters\".")))
88 return false;
89 denominator.push_back(value);
90 }
91 m_tf->SetNumerator(numerator);
92 m_tf->SetDenominator(denominator);
93 m_tf->UpdateTFText();
94 return true;
95}
static bool DoubleFromString(wxWindow *parent, wxString strValue, double &value, wxString errorMsg)
Get a double value from a string. Show a error message if the conversion fail.