Fixed sortUsingDescriptors: so it can handle sort descriptors

with a key path instead of just a key.
Also added a test case for this.
This commit is contained in:
Martin Carlberg
2012-07-06 20:52:33 +02:00
parent 34e7d4abe5
commit e265d09034
2 changed files with 18 additions and 2 deletions
+2 -2
View File
@@ -485,7 +485,7 @@ var sortArrayUsingJSDescriptors = function(a, d)
do
{
key = d[cn].k;
C1[key] = [A valueForKey:key];
C1[key] = [A valueForKeyPath:key];
} while (cn--)
c[aUID] = C1;
@@ -506,7 +506,7 @@ var sortArrayUsingJSDescriptors = function(a, d)
do
{
key = d[cn].k;
C2[key] = [B[i] valueForKey:key];
C2[key] = [B[i] valueForKeyPath:key];
} while (cn--)
c[bUID] = C2;