Error on p. 341? NSSortDescriptor Key:@"name"


I was wondering if there is an error on p. 341 on the bottom.

Instead of:

shouldn’t it be?:

Notice that the only difference is that the Key @“name” is replaced by @“classname”.


I saw this too,
I agree with the implied point that this an error, and I agree with the suggested correction. The program still runs with “name”, but the classes are not sorted alphabetically - there is no descriptor of “name”, so nothing gets sorted. When I first ran it with “name” (or you can put any random text to the same result), the first class in the logged list is “NSMetadataQueryAttributeValueTuple”. When you use “classname”, the first class logged is “CFPDCFDataBuffer”, and then they appear to accend from there.