mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-14 14:41:28 +00:00
Refs #1538. Clean up, accidental global.
This commit is contained in:
@@ -815,7 +815,7 @@ var concat = Array.prototype.concat,
|
||||
description += "\n";
|
||||
}
|
||||
|
||||
return description + ')';
|
||||
return description + ")";
|
||||
}
|
||||
|
||||
// Collecting paths
|
||||
|
||||
@@ -538,7 +538,7 @@ function CPDescriptionOfObject(anObject)
|
||||
if (typeof(anObject) !== "object")
|
||||
return String(anObject);
|
||||
|
||||
desc = "JSObject\n{\n";
|
||||
var desc = "JSObject\n{\n";
|
||||
|
||||
for (var property in anObject)
|
||||
{
|
||||
|
||||
@@ -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 + "}";
|
||||
};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"key3": {
|
||||
"another": "object"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
string_dict = [[CPDictionary alloc] initWithObjects:[@"1", @"2", @"This is a String", @"This is a String"] forKeys:[@"key1", @"key2", @"key3", @"key4"]];
|
||||
json_dict = [CPDictionary dictionaryWithJSObject:json recursively:YES];
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
|
||||
[pretty sortUsingDescriptors:[[[CPSortDescriptor alloc] initWithKey:@"value" ascending:YES]]];
|
||||
|
||||
[self assert:"(\n\t0:a,\n\t1:b,\n\t2:c,\n\t3:d\n)" equals:[pretty description]]
|
||||
[self assert:"(\n\t0:a,\n\t1:b,\n\t2:c,\n\t3:d\n)" equals:[pretty description]];
|
||||
}
|
||||
|
||||
- (void)testThatCPArrayDoesSortUsingTwoDescriptors
|
||||
|
||||
Reference in New Issue
Block a user