virtual bool Write(const wxString& key, double value);
virtual bool Write(const wxString& key, bool value);
- // permanently writes all changes
+ // we have to provide a separate version for C strings as otherwise they
+ // would be converted to bool and not to wxString as expected!
+ virtual bool Write(const wxString& key, const wxChar *value);
+
+ // permanently writes all changes
virtual bool Flush(bool bCurrentOnly = FALSE) = 0;
// renaming, all functions return FALSE on failure (probably because the new
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++