简体   繁体   中英

Hacking the NSDocument architecture

I'm working on creating an NSDocument-based app with tabs for documents. I have found that it wasn't really designed for this. Apple designed the architechture to allow multiple windows for a single document but not the other way around. I have it basically working but I have started to run into weird issues. For example, when a window is closed, the window controller is dealloc'd but not the tab bar inside the window.

About the only information I could find on the web is this super-sketchy code in a forum post:

http://www.idevapps.com/forum/showthread.php?t=6330

Any advice?

这可能会有所帮助(Cocoadev.com Wiki): DocumentBasedAppWithOneWindowForAllDocuments ...我个人不能为其提供担保,但已经存在了几年。

好吧,如果您要深入研究并从根本上改变NSDocumentController,NSDocument和NSWindowController交互方式的层次结构,则可能应该首先以常规方式实现应用程序,以带动文档架构的发展。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM