mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-01 08:23:35 +00:00
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]);
This commit is contained in:
@@ -799,22 +799,20 @@ var concat = Array.prototype.concat,
|
||||
{
|
||||
var index = 0,
|
||||
count = [self count],
|
||||
description = '(';
|
||||
description = "(";
|
||||
|
||||
for (; index < count; ++index)
|
||||
{
|
||||
if (index === 0)
|
||||
description += '\n';
|
||||
description += "\n\t";
|
||||
|
||||
var object = [self objectAtIndex:index],
|
||||
objectDescription = object && object.isa ? [object description] : String(object);
|
||||
|
||||
description += "\t" + objectDescription.split('\n').join("\n\t");
|
||||
var object = [self objectAtIndex:index];
|
||||
description += CPDescriptionOfObject(object);
|
||||
|
||||
if (index !== count - 1)
|
||||
description += ", ";
|
||||
|
||||
description += '\n';
|
||||
description += ",\n\t";
|
||||
else
|
||||
description += "\n";
|
||||
}
|
||||
|
||||
return description + ')';
|
||||
|
||||
Reference in New Issue
Block a user