我有一个简单的 NSArrayController 连接到我的一个 coreData 模型。我可以毫无问题地轻松显示 NSTableView 中的所有项目,但是,如果我尝试将包含 NSPopUpButtonCell 的 NSTableColumn 绑定到同一控制器上的排列对象,我会收到一个令人讨厌的异常。(但是,如果我绑定到表外的 NSPopupButton,一切似乎都正常工作)
Catchpoint 2 (throw)2011-12-18 16:00:07.251 MyApp[6050:707] -[MyCoreDataModel count]: unrecognized selector sent to instance 0x10045aea0
Catchpoint 2 (exception thrown).2011-12-18 16:01:32.901 MyApp[6050:707] -[MyCoreDataModel count]: unrecognized selector sent to instance 0x10045aea0
2011-12-18 16:01:32.907 MyApp[6050:707] (
0 CoreFoundation 0x00007fff9191e286 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff93bd6d5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff919aa4ce -[NSObject doesNotRecognizeSelector:] + 190
3 CoreFoundation 0x00007fff9190b133 ___forwarding___ + 371
4 CoreFoundation 0x00007fff9190af48 _CF_forwarding_prep_0 + 232
5 AppKit 0x00007fff8b5bbad3 -[_NSSelectionBinderPlugin populateObject:withContent:valueKey:objectKey:insertsNullPlaceholder:] + 235
6 AppKit 0x00007fff8b45242e -[NSSelectionBinder _adjustObject:mode:observedController:observedKeyPath:context:editableState:adjustState:] + 678
7 AppKit 0x00007fff8b56f11a -[NSValueBinder updateTableColumnDataCell:forDisplayAtIndex:] + 145
8 AppKit 0x00007fff8b5af502 -[_NSBindingAdaptor tableColumn:willDisplayCell:row:] + 112
9 AppKit 0x00007fff8b0a00b1 -[NSTableView _tryCellBasedMouseDown:atRow:column:withView:] + 498
10 AppKit 0x00007fff8b062a4c -[NSTableView mouseDown:] + 1072
11 AppKit 0x00007fff8afc90e0 -[NSWindow sendEvent:] + 6306
12 AppKit 0x00007fff8af6168f -[NSApplication sendEvent:] + 5593
13 AppKit 0x00007fff8aef7682 -[NSApplication run] + 555
14 AppKit 0x00007fff8b17680c NSApplicationMain + 867
15 InstaLibrary 0x0000000100001732 main + 34
16 InstaLibrary 0x0000000100001704 start + 52
为什么会这样?为什么不能多处复用阵列控制器?