src/core/object.cc
changeset 2520 a4896ebf6e1d
parent 2502 50d0da37f02f
child 2522 7c9d1c314beb
--- a/src/core/object.cc	Sat Mar 01 05:42:14 2008 +0100
+++ b/src/core/object.cc	Sat Mar 01 19:54:48 2008 +0100
@@ -860,7 +860,7 @@
           return false;
         }
       // attempt to convert back to value.
-      Attribute v = info->initialValue.Copy ();
+      Attribute v = info->checker->Create ();
       ok = v.DeserializeFromString (str->Get ().Get (), info->checker);
       if (!ok)
         {
@@ -958,7 +958,7 @@
                 value = str.substr (equal+1, next - (equal+1));
                 cur++;
               }
-            Attribute val = info.initialValue.Copy ();
+            Attribute val = info.checker->Create ();
             bool ok = val.DeserializeFromString (value, info.checker);
             if (!ok)
               {
@@ -1087,7 +1087,7 @@
           return false;
         }
       // attempt to convert back from string.
-      Attribute v = initialValue.Copy ();
+      Attribute v = checker->Create ();
       ok = v.DeserializeFromString (str->Get ().Get (), checker);
       if (!ok)
         {
@@ -1129,7 +1129,7 @@
     {
       return false;
     }
-  Attribute v = info.initialValue.Copy ();
+  Attribute v = info.checker->Create ();
   bool ok = info.accessor->Get (this, v);
   if (ok)
     {
@@ -1150,7 +1150,7 @@
     {
       return Attribute ();
     }
-  Attribute value = info.initialValue.Copy ();
+  Attribute value = info.checker->Create ();
   bool ok = info.accessor->Get (this, value);
   if (!ok)
     {