我在NSSplitView
xib文件中有一个NSViewController's
。如果我将代理出口连接到文件所有者,或者如果我在代码(self.splitView.delegate = self
)中执行相同操作,则应用程序崩溃。没有错误消息,它只是在main.m
中停止。我没有实现任何NSSplitViewDelegate
方法,只是连接了插座。这是回溯:
* thread #1: tid = 0x6f27f8, 0x00007fff8f58a097 libobjc.A.dylib`objc_msgSend + 23, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
frame #0: 0x00007fff8f58a097 libobjc.A.dylib`objc_msgSend + 23
frame #1: 0x00007fff8dfb98d8 AppKit`-[NSSplitView _effectiveFrameForDrawnFrame:ofDividerAtIndex:] + 477
frame #2: 0x00007fff8dfb9499 AppKit`-[NSSplitView resetCursorRects] + 500
frame #3: 0x00007fff8df62664 AppKit`-[NSView(NSInternal) _updateTrackingAreas] + 610
frame #4: 0x00007fff8df62a17 AppKit`-[NSView(NSInternal) _updateTrackingAreas] + 1557
frame #5: 0x00007fff8df62a17 AppKit`-[NSView(NSInternal) _updateTrackingAreas] + 1557
frame #6: 0x00007fff8df62a17 AppKit`-[NSView(NSInternal) _updateTrackingAreas] + 1557
frame #7: 0x00007fff8df62a17 AppKit`-[NSView(NSInternal) _updateTrackingAreas] + 1557
frame #8: 0x00007fff8dfb8f34 AppKit`_handleInvalidCursorRectsNote + 994
frame #9: 0x00007fff8e5968a1 AppKit`__35-[NSWindow _postInvalidCursorRects]_block_invoke2988 + 46
frame #10: 0x00007fff81f7de17 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
frame #11: 0x00007fff81f7dd87 CoreFoundation`__CFRunLoopDoObservers + 391
frame #12: 0x00007fff81f6f468 CoreFoundation`__CFRunLoopRun + 776
frame #13: 0x00007fff81f6ef25 CoreFoundation`CFRunLoopRunSpecific + 309
frame #14: 0x00007fff87070a0d HIToolbox`RunCurrentEventLoopInMode + 226
frame #15: 0x00007fff87070685 HIToolbox`ReceiveNextEventCommon + 173
frame #16: 0x00007fff870705bc HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 65
frame #17: 0x00007fff8de1c3de AppKit`_DPSNextEvent + 1434
frame #18: 0x00007fff8de1ba2b AppKit`-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
frame #19: 0x00007fff8de0fb2c AppKit`-[NSApplication run] + 553
frame #20: 0x00007fff8ddfa913 AppKit`NSApplicationMain + 940
我在应用程序中有另一个拆分视图,虽然它在NSWindowController中,而不是视图控制器。它与委托连接一起工作正常。有问题的分割视图控制器位于窗口控制器的一个分割视图窗格内,如果这很重要的话。我应该能够筑巢,对吗?