So I'm trying to play around with WebKit and create my own browser. However, now I'm kind of stuck where I can't hide the save panel when I try to close my window. I can't find any method in the NSDocument reference that hides the panel. Does anyone know how I can solve that? Thanks.

有帮助吗?

解决方案

I'd have to say that NSDocument is a slightly odd choice for a browser app. The Cocoa document architecture is really designed for editor-type applications that load and save files from disk, whereas there is no real concept of a "document" in a browser.

Why not just implement a main controller that manages a bunch of window controllers? What does the document architecture give you that you feel your app needs?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top