1 Reply Latest reply on Aug 5, 2010 5:49 AM by JabbyPandaUA

    ObjectUtil.Copy read-only property not being copied




      I am using ObjectUtil.Copy to make a copy a new instance of an object and and a read-only property of the class does not get set and is null or "NaN" in the newly copied object.

      registerClassAlias("objects.ObjClass", ObjClass);
      obj2 = ObjectUtil.copy(obj1) as ObjClass;


      Every other property that is not read-only gets set, I tried to make it ignore the get property by using the Transient keyword like this but that did not work:


      public function get fid():Number {
            return id;


      When I add a set property the copy works, or if I remove the get function the id private variable gets changed fine, but I want to keep it private and use properties. Any ideas?