To do the challenge, I changed the attributes on the name column as follows:
Sort Key: name.length
Selector: compare:
When I click on the name problem, I get these messages on the console:
[quote]2015-07-31 19:13:59.417 RaiseMan[5089:88654] -[__NSCFNumber compare]: unrecognized selector sent to instance 0x1137
2015-07-31 19:13:59.418 RaiseMan[5089:88654] -[__NSCFNumber compare]: unrecognized selector sent to instance 0x1137
2015-07-31 19:13:59.425 RaiseMan[5089:88654] (
0 CoreFoundation 0x00007fff91baf03c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff8ffd076e objc_exception_throw + 43
2 CoreFoundation 0x00007fff91bb20ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff91af7e24 forwarding + 1028
4 CoreFoundation 0x00007fff91af7998 _CF_forwarding_prep_0 + 120
5 Foundation 0x00007fff8c3e2147 _NSCompareObject + 49
6 CoreFoundation 0x00007fff91aaf27b __CFSimpleMergeSort + 75
7 CoreFoundation 0x00007fff91aaf1f5 CFSortIndexes + 549
8 CoreFoundation 0x00007fff91aeffc0 CFMergeSortArray + 240
9 Foundation 0x00007fff8c3e1c8a _sortedObjectsUsingDescriptors + 614
10 Foundation 0x00007fff8c42ebb8 -[NSMutableArray(NSKeyValueSorting) sortUsingDescriptors:] + 466
11 AppKit 0x00007fff83cf9d9b -[NSArrayController _sortObjects:] + 304
12 AppKit 0x00007fff83cf6bdb -[NSArrayController _arrangeObjectsWithSelectedObjects:avoidsEmptySelection:operationsMask:useBasis:] + 230
13 AppKit 0x00007fff83f29afd -[NSArrayController setSortDescriptors:] + 223
14 Foundation 0x00007fff8c3ade7d -[NSObject(NSKeyValueCoding) setValue:forKey:] + 395
15 Foundation 0x00007fff8c3d0901 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 339
16 AppKit 0x00007fff83e4ff64 -[NSBinder _setValue:forKeyPath:ofObject:mode:validateImmediately:raisesForNotApplicableKeys:error:] + 360
17 AppKit 0x00007fff83e4fda3 -[NSBinder setValue:forBinding:error:] + 248
18 AppKit 0x00007fff83f24d59 -[NSTableBinder tableView:didChangeToSortDescriptors:] + 146
19 AppKit 0x00007fff83f24cb0 -[_NSBindingAdaptor tableView:didChangeToSortDescriptors:] + 153
20 AppKit 0x00007fff83e5b543 -[NSTableView setSortDescriptors:] + 228
21 AppKit 0x00007fff84246b58 -[NSTableView _changeSortDescriptorsForClickOnColumn:] + 388
22 AppKit 0x00007fff8422fc25 -[NSTableHeaderView _trackAndModifySelectionWithEvent:onColumn:stopOnReorderGesture:] + 1046
23 AppKit 0x00007fff84232992 -[NSTableHeaderView mouseDown:] + 434
24 AppKit 0x00007fff842ff2dc -[NSWindow _reallySendEvent:isDelayedEvent:] + 14125
25 AppKit 0x00007fff83c8ec86 -[NSWindow sendEvent:] + 470
26 AppKit 0x00007fff83c8b212 -[NSApplication sendEvent:] + 2504
27 AppKit 0x00007fff83bb4b68 -[NSApplication run] + 711
28 AppKit 0x00007fff83b31244 NSApplicationMain + 1832
29 RaiseMan 0x000000010000557d main + 109
30 libdyld.dylib 0x00007fff87f2d5c9 start + 1
)[/quote]
I see that javoid has posted a spoiler where he gives what seems to be exactly the same solution. Can you tell me what’s wrong? The only item that looks informative to me in the above list is number 3, “doesNotRecognizeSelector:” but I don’t know what to do about it. I tried putting the sort key in quotes: “name.length” but that didn’t work either. I got