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


#1

Hi,
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”.


#2

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.