bool wxConfigBase::Read(const wxString& key, double* val) const
{
wxString str;
- if (Read(key, & str))
+ if ( Read(key, &str) )
{
- return wxSscanf(str, _T("%g"), val) == 1;
+ return str.ToDouble(val);
}
return FALSE;
return Write(key, value ? 1l : 0l);
}
+bool wxConfigBase::Write(const wxString& key, const wxChar *value)
+{
+ // explicit cast needed, otherwise value would have been converted to bool
+ return Write(key, wxString(value));
+}
+
wxString wxConfigBase::ExpandEnvVars(const wxString& str) const
{
wxString tmp; // Required for BC++