I have a application that isn’t currently a document-based application (because I thought it would be more trouble than its worth). However I’ve been thinking it may possibly be worth it now, but there is one issue I haven’t worked out yet. Sharing NSDocument subclasses between multiple windows.
So do subclasses of NSDocument have to be tied to a single NSWindowController, or can I share these between multiple windows? The reason I ask is my applications files are likely to up 100MiB (or larger) and its also likely that a user will open the same file in more than one window. Also these files take a relatively long time to process, so allowing multiple windows access to the same NSDocument would be excellent. Also, the files are updated very quickly with lots of data, so synchronizing multiple instances of the same document would use a lot of CPU time.
Has anybody done this, or can it even be done with a Document-based application? Any advice on this topic is greatly appreciated.
So far this is the best answer I’ve found, which doesn’t directly answer the question, but deals with many of the same obstacles I’m facing. Hopefully someone else has a better, more detailed and direct answer for me.
http://www.cocoadev.com/index.pl?DocumentBasedAppWithOneWindowForAllDocuments