]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied [ 586524 ] wxVariant Enhancements.
authorJulian Smart <julian@anthemion.co.uk>
Thu, 1 Aug 2002 20:00:55 +0000 (20:00 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 1 Aug 2002 20:00:55 +0000 (20:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/variant.h
src/common/variant.cpp

index 72db3faae97c86048eb220446385a4f14f3966cc..4ddfbc10fa986d183e2506d0c0305a26683ead8b 100644 (file)
@@ -268,7 +268,7 @@ public:
     void ClearList();
 
 // Implementation
-protected:
+public:
 // Type conversion
     bool Convert(long* value) const;
     bool Convert(bool* value) const;
index defe41807fdf1002c87921e4358e9369369da799..48d54c7ec1841cdf6b57e586e678fabeef37a726 100644 (file)
@@ -2244,9 +2244,11 @@ bool wxVariant::Convert(wxDateTime* value) const
 {
     wxString type(GetType());
     if (type == wxT("datetime"))
+    {
         *value = ((wxVariantDataDateTime*)GetData())->GetValue();
-    else
-        return FALSE;
-
-    return TRUE;
+       return TRUE;
+    } 
+    // Fallback to string conversion
+    wxString val;
+    return Convert(&val) && (value->ParseDate(val));
 }