【发布时间】:2014-12-30 10:40:22
【问题描述】:
我使用以下方法单击位于我的 OS X 应用程序主窗口上的 NSButton (openPanel) 以显示 NSPanel (myPanel):
- (IBAction)openPanel:(id)sender {
[_myPanel makeKeyAndOrderFront:nil];
}
除了我第一次单击按钮(openPanel)时在调试区域中得到以下描述外,一切都按预期工作:
"unlockFocus called too many times. Called on NSButton: 0x610000141080."
Panel的属性选择如下:
Style: Utility Panel,
Appearance:Title Bar and Shadow,
Controls: Close,
Behaviour: Restorable,
Memory: Deferred
我浏览了网络,但找不到任何解释。有谁知道为什么会发生这种情况或如何解决?
【问题讨论】:
-
我遇到了类似的问题。 (1) 使用情节提要 (2) 仅在第一次单击按钮时发生 - 随后很好 (3) 我正在使用按钮通过 NSDocument 显示 NSSavePanel。
标签: objective-c macos nspanel