【问题标题】:CPWindow is blocked after closing CPPanel关闭CPanel后窗口被阻塞
【发布时间】:2013-08-04 09:08:28
【问题描述】:

我将这两个网点添加到我的AppController.j

@outlet CPWindow theWindow;
@outlet CPWindow thePanel;

theWindow 填满整个浏览器窗口 (setFullPlatformWindow:YES)。

现在我使用CPToolbarItem(在我添加到theWindowCPToolbar 中)在点击时执行此方法:

- (IBAction)showPanel:(id)aSender {

    // ...
    [CPApp runModalForWindow:thePanel];
}

我已经在 Interface Builder 中创建了所有这些 UI 元素。

当我关闭 thePanel 时,theWindow 似乎卡住了 - 无法单击按钮或以任何其他方式与 theWindow 中的元素交互。

这里出了什么问题?

【问题讨论】:

    标签: cappuccino


    【解决方案1】:

    您可能没有成功关闭面板,因此它的模态状态仍然处于活动状态。在负责关闭面板的代码中试试这个:

    [CPApp abortModal];
    [thePanel close];
    

    【讨论】:

    • 谢谢,现在可以使用了!现在,我什至不必以编程方式关闭面板,而是使用面板的默认关闭按钮。
    猜你喜欢
    • 1970-01-01
    • 2015-03-22
    • 1970-01-01
    • 2022-11-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多