Well, if you need a nil keypath you probably shouldn't be using sort
descriptors. The primary value of sort descriptors are (a) the KVC caching and
(b) an OO representation of a sort criteria.
The standard -sortedArrayUsingComparator: is for blocks like the one you wrote
that are completely
Hello Ben,
thanks very much for your answer. Your idea with the nil keypath works!
So changing the line in question to:
NSSortDescriptor *descr3 = [ NSSortDescriptor sortDescriptorWithKey:nil
ascending:YES
comparator:^NSComparisonResult(id obj1, id obj2) {
is sorting the array without claim
> while experimenting with sorting methods I got a strange error message with
> -sortDescriptorWithKey:ascending:comparator:.
>
> In the following listing (as simple as possible) an Array can be sorted with
> -sortedArrayUsingDescriptors: with a selector, and
> -sortedArrayUsingComparator:
>
> B
Hello List,
while experimenting with sorting methods I got a strange error message with
-sortDescriptorWithKey:ascending:comparator:.
In the following listing (as simple as possible) an Array can be sorted with
-sortedArrayUsingDescriptors: with a selector, and
-sortedArrayUsingComparator:
But