Applied [ 586524 ] wxVariant Enhancements.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-08-01 20:00:55 +00:00
parent e02911a260
commit 9708db208d
2 changed files with 7 additions and 5 deletions

View File

@@ -268,7 +268,7 @@ public:
void ClearList(); void ClearList();
// Implementation // Implementation
protected: public:
// Type conversion // Type conversion
bool Convert(long* value) const; bool Convert(long* value) const;
bool Convert(bool* value) const; bool Convert(bool* value) const;

View File

@@ -2244,9 +2244,11 @@ bool wxVariant::Convert(wxDateTime* value) const
{ {
wxString type(GetType()); wxString type(GetType());
if (type == wxT("datetime")) if (type == wxT("datetime"))
{
*value = ((wxVariantDataDateTime*)GetData())->GetValue(); *value = ((wxVariantDataDateTime*)GetData())->GetValue();
else return TRUE;
return FALSE; }
// Fallback to string conversion
return TRUE; wxString val;
return Convert(&val) && (value->ParseDate(val));
} }