diff --git a/src/as/com/threerings/presents/data/ClientObject.as b/src/as/com/threerings/presents/data/ClientObject.as index 2826be672..7b2283e1e 100644 --- a/src/as/com/threerings/presents/data/ClientObject.as +++ b/src/as/com/threerings/presents/data/ClientObject.as @@ -21,8 +21,6 @@ package com.threerings.presents.data { -import mx.utils.ObjectUtil; - import com.threerings.presents.dobj.DObject; import com.threerings.presents.dobj.DSet; import com.threerings.presents.dobj.DSet_Entry; @@ -79,7 +77,7 @@ public class ClientObject extends DObject { requestAttributeChange(RECEIVERS, value, this.receivers); this.receivers = (value == null) ? null - : (ObjectUtil.copy(value) as DSet); + : (value.clone() as DSet); } // AUTO-GENERATED: METHODS END diff --git a/src/as/com/threerings/presents/dobj/DSet.as b/src/as/com/threerings/presents/dobj/DSet.as index 82ef413c9..6f575911c 100644 --- a/src/as/com/threerings/presents/dobj/DSet.as +++ b/src/as/com/threerings/presents/dobj/DSet.as @@ -3,6 +3,7 @@ package com.threerings.presents.dobj { import mx.utils.ObjectUtil; import com.threerings.util.ArrayIterator; +import com.threerings.util.Cloneable; import com.threerings.util.Equalable; import com.threerings.util.Iterator; import com.threerings.util.StringBuilder; @@ -32,7 +33,7 @@ import com.threerings.io.TypedArray; * a {@link Streamable} type. */ public class DSet - implements Streamable + implements Cloneable, Streamable { /** * Returns the number of entries in this set. @@ -189,6 +190,16 @@ public class DSet return null; } + // from interface Cloneable + public function clone () :Object + { + var other :DSet = new DSet(); + for each (var val :DSet_Entry in _entries) { + other._entries.push(val); + } + return other; + } + /** * Generates a string representation of this set instance. */