WebView Cocoa 控件在窗口关闭时崩溃
当我关闭包含 web 视图的 NSDocument 的主窗口时,我在尝试访问 -[WebView(WebViewEditing) undoManager]
的 WebEditorClient::clearUndoRedoOperations
中发生崩溃里面有一个文本编辑器。仅当存在可撤消状态时才会发生。看起来像是可可中的一个错误,但我可能做错了什么。有什么想法可能会发生这种情况吗?网络视图位于笔尖中,不是以编程方式创建的,所以我不确定我能做什么来开始修复这个问题。
I get a crash in WebEditorClient::clearUndoRedoOperations
which is trying to access -[WebView(WebViewEditing) undoManager]
when I close the main window of an NSDocument that contains a webview with a text editor in it. It only happens when there is an undo-able state. Seems like a bug in Cocoa, but I might be doing something wrong. Any ides why this might be going on? The web view is in a nib and not created programmatically, so I'm not sure what I can do to even begin fixing this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,在对文档调用 close 之前将其从超级视图中删除似乎已经修复了它。不过,这并不能解释发生了什么,只是将其放在这里以防其他人遇到这个问题。
Well, removing it from superview prior to calling close on the document seems to have fixed it. Still, that doesn't explain what was going on, but just putting it here in case other people have this problem.