One window for all documents.
One window for all documents.
- Subject: One window for all documents.
- From: Chaz McGarvey <email@hidden>
- Date: Tue, 10 May 2005 00:54:15 -0600
Hello:
Program design question: My theoretical app can open files with
extension "foo" and I would like to have the benefits of NSDocument.
However, I want a single window with an NSTableView to contain a list
of "open" documents. This shared window will be used to display
information from the file. The list is updated as foo files are
opened. In order to edit the file, you double-click an item from the
shared window and a document window comes up. So basically, the
shared window just sits there display information about the documents
that are open, and the other windows are the document windows which
need the benefits of NSDocument, like saving. This scenario probably
isn't very exciting or innovative.
In order for this to work, an NSDocument has to be able to stay
loaded even when it has no windows on-screen for it. The problem is
that the NSDocument is automatically released when the 'document'
window closes. I could do something like feed it a dummy window
controller so it thinks it should stick around, but I've found that
whenever I'm tempted to do something ugly like this, there usually is
a better, more appropriate way. Any insights? I'm tired.
chaz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden