Reveal the contents of Dictionary objects in toString
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5345 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -25,6 +25,7 @@ import com.threerings.util.env.Environment;
|
|||||||
|
|
||||||
import flash.utils.ByteArray;
|
import flash.utils.ByteArray;
|
||||||
import flash.utils.Dictionary;
|
import flash.utils.Dictionary;
|
||||||
|
import flash.utils.getQualifiedClassName;
|
||||||
|
|
||||||
public class StringUtil
|
public class StringUtil
|
||||||
{
|
{
|
||||||
@@ -303,7 +304,8 @@ public class StringUtil
|
|||||||
return String(obj);
|
return String(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (obj is Array || Util.isPlainObject(obj)) {
|
var isDictionary :Boolean = obj is Dictionary;
|
||||||
|
if (obj is Array || isDictionary || Util.isPlainObject(obj)) {
|
||||||
if (refs == null) {
|
if (refs == null) {
|
||||||
refs = new Dictionary();
|
refs = new Dictionary();
|
||||||
|
|
||||||
@@ -333,7 +335,7 @@ public class StringUtil
|
|||||||
}
|
}
|
||||||
s += prop + "=>" + toString(obj[prop], refs);
|
s += prop + "=>" + toString(obj[prop], refs);
|
||||||
}
|
}
|
||||||
return "Object(" + s + ")";
|
return (isDictionary ? "Dictionary" : "Object") + "(" + s + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (obj is XML) {
|
} else if (obj is XML) {
|
||||||
|
|||||||
Reference in New Issue
Block a user