mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 21:17:03 +00:00
(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:
@@ -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 + "}";
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user