(Fix commit attribution) Merge pull request #1538 from mrcarlberg/cappuccino

---

Dont you hate when your logs of arrays and dictionaries display [Object object] when you have JavaScript objects in them. Now with this patch all JavaScript objects will be display with all attributes in a nice good looking way. Log CGRect, CGPoint and other JavaScript objects withour any hassle anymore. For example: console.log([myRect]);

Conflicts:
	Foundation/CPObject.j
	Tests/Foundation/CPMutableArrayTest.j
This commit is contained in:
Alexander Ljungberg
2012-05-14 21:20:41 +01:00
+6 -6
View File
@@ -136,17 +136,17 @@ DISPLAY_NAME(CFDictionary.prototype.valueForKey);
CFDictionary.prototype.toString = function()
{
var string = "{\n",
keys = this._keys,
index = 0,
count = this._count;
keys = this._keys,
index = 0,
count = this._count;
for (; index < count; ++index)
{
var key = keys[index];
string += "\t" + key + " = \"" + String(this.valueForKey(key)).split('\n').join("\n\t") + "\"\n";
}
return string + "}";
};