我有一个 Cocoa 应用程序,其中包含一个控制NSWindowController
项。没什么特别的,在升级到 OS X 10.7.2 之前它运行良好。现在我得到以下异常,当窗口控制器的窗口加载时,它只发生一次。(由于我的应用程序中的窗口控制器保持加载状态,每次应用程序启动只会发生一次。)随后聚焦和取消聚焦组合框不会触发它。NSWindow
NSComboBox
任何人都知道 10.7.2 中是否发生了变化,如果是,如何解决?
(这发生在 Xcode 4.2 中。)
2011-10-24 11:30:21.649 MyApp[7934:707] Unlocking Focus on wrong view ((null)), expected <NSComboBox: 0x40083d6e0>
2011-10-24 11:30:21.653 MyApp[7934:707] (
0 CoreFoundation 0x00007fff8412d286 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff88cdad5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff8412d0ba +[NSException raise:format:arguments:] + 106
3 CoreFoundation 0x00007fff8412d044 +[NSException raise:format:] + 116
4 AppKit 0x00007fff8c76c1d5 -[NSFocusStack unfocusView:] + 194
5 AppKit 0x00007fff8c7e838e +[_NSAutomaticFocusRing showForView:] + 2545
6 AppKit 0x00007fff8cdbb4d1 __postActiveFirstResponderChanged_block_invoke_1 + 32
7 CoreFoundation 0x00007fff840ecf37 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
8 CoreFoundation 0x00007fff840ece96 __CFRunLoopDoObservers + 374
9 CoreFoundation 0x00007fff840c2159 __CFRunLoopRun + 825
10 CoreFoundation 0x00007fff840c1ae6 CFRunLoopRunSpecific + 230
11 HIToolbox 0x00007fff8c0d73d3 RunCurrentEventLoopInMode + 277
12 HIToolbox 0x00007fff8c0de58f ReceiveNextEventCommon + 181
13 HIToolbox 0x00007fff8c0de4ca BlockUntilNextEventMatchingListInMode + 62
14 AppKit 0x00007fff8c71e3f1 _DPSNextEvent + 659
15 AppKit 0x00007fff8c71dcf5 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
16 AppKit 0x00007fff8c71a62d -[NSApplication run] + 470
17 AppKit 0x00007fff8c99980c NSApplicationMain + 867
18 MyApp 0x0000000100001682 main + 34
19 MyApp 0x0000000100001654 start + 52
)