Challenge 1 Error


#1

Hi

In the attributes inspector for the table column I’ve got the sort key set to personName.length and the selector set to compare: .
When I run the program and add some employees as soon as I click on the column header to sort I get the error below…

Anyone have any ideas ?

Thanks

Lenny

RaiseMan[864:707] Error setting value for key path sortDescriptors of object <NSArrayController: 0x100426c80>[object class: Person, number of selected objects: 1] (from bound object <NSTableView: 0x100166280>): [<__NSCFString 0x1004a1870> valueForUndefinedKey:]: this class is not key value coding-compliant for the key lenght.
2012-02-16 15:21:40.608 RaiseMan[864:707] (
0 CoreFoundation 0x00007fff8bc8ffc6 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff8e315d5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff8bc8fdfa +[NSException raise:format:arguments:] + 106
3 AppKit 0x00007fff8aec8a9d -[NSBinder _setValue:forKeyPath:ofObject:mode:validateImmediately:raisesForNotApplicableKeys:error:] + 893
4 AppKit 0x00007fff8aec8382 -[NSBinder setValue:forBinding:error:] + 260
5 AppKit 0x00007fff8b18b3cf -[NSTableBinder tableView:didChangeToSortDescriptors:] + 136
6 AppKit 0x00007fff8b2a947c -[_NSBindingAdaptor tableView:didChangeToSortDescriptors:] + 153
7 AppKit 0x00007fff8b19dc32 -[NSTableView setSortDescriptors:] + 277
8 AppKit 0x00007fff8b19d95e -[NSTableView _changeSortDescriptorsForClickOnColumn:] + 594
9 AppKit 0x00007fff8b1928e3 -[NSTableHeaderView _trackAndModifySelectionWithEvent:onColumn:stopOnReorderGesture:] + 340
10 AppKit 0x00007fff8b18fd81 -[NSTableHeaderView mouseDown:] + 471
11 AppKit 0x00007fff8acc06e0 -[NSWindow sendEvent:] + 6306
12 AppKit 0x00007fff8ac5916d -[NSApplication sendEvent:] + 5593
13 AppKit 0x00007fff8abef1f2 -[NSApplication run] + 555
14 AppKit 0x00007fff8ae6db88 NSApplicationMain + 867
15 RaiseMan 0x00000001000012d2 main + 34
16 RaiseMan 0x00000001000012a4 start + 52
)
len2011

Posts: 19
Joined: Thu Oct 06, 2011 1:10 pm