Support Dictionary, too.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4972 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2008-03-18 22:13:53 +00:00
parent 783ea0d166
commit 76f77b9748
@@ -29,6 +29,7 @@ import flash.geom.Rectangle;
import flash.system.ApplicationDomain;
import flash.utils.ByteArray;
import flash.utils.Dictionary;
import flash.utils.Endian;
import flash.utils.IExternalizable;
import flash.utils.getQualifiedSuperclassName; // function import
@@ -146,6 +147,20 @@ public class ObjectMarshaller
}
// then, continue on with the sub-properties check (below)
} else if (value is Dictionary) {
if (ClassUtil.getClassName(value) != "flash.utils.Dictionary") {
return "Custom Dictionary subclasses are not supported";
}
// check all the keys
for (var key :* in value) {
var se :String = getValidationError(key);
if (se != null) {
return se;
}
}
// then, continue on with sub-property check (below)
} else {
var type :String = typeof(value);
if (type == "number" || type == "string" || type == "boolean" ) {