Reputation: 453
I am writing a document based application, where there is a project file that the user opens, and a number of associated source files, all of which I wish to edit in the same window. How can I do this within the NSDocument
architecture? specifically how can create multiple NSDocument
s as children of the NSDocument
associated to the project file, and then display these all within one window controller.
This has been asked before (e.g. Multiple Documents in a Single Window in Cocoa), but the answers suggest working outside of the document architecture, something no longer possible with the recent App Store rule change that requires all applications to use the sandbox, which requires all IO via NSDocument.
Upvotes: 2
Views: 849
Reputation: 33379
Over on the question you linked, I just added a new answer: Multiple Documents in a Single Window in Cocoa
My idea is a system where you have a single document per window, but that window is a borderless child of some other window, which will position/resize/hide the actual document window at will, and link the child window's view into the responder chain.
I haven't done it, but plan to. I think it will work better than any of the other techniques I've seen.
Upvotes: 1