问题描述
我有一个使用nswindow:beginsheet:completionhandler:
显示为表格的NSPanel。
显示后,我用setStringValue
更改了NSPanel中的NSTextfield。
这适用于10.12和10.13,但不适用于10.14+,因为在显示工作表后NSTextField无法更改。
有人知道为什么,或者如何在10.14+中解决此问题?在10.14发行说明中找不到任何相关内容。
以下是相关代码:
// Declarations
NSWindow *thisWindow;
IBOutlet NSPanel *progressPanel;
IBOutlet NSTextField *progressText;
// Show the sheet
[thisWindow beginSheet:progressPanel completionHandler:^(NSModalResponse returnCode) {
}];
// Update the NSTextField
- (void) progressSetData: (NSString *) data
{
[progressText setStringValue:data];
progressText.needsDisplay = YES;
[progressPanel display];
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)