• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
One window for all documents.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: One window for all documents.
      • From: Darkshadow <email@hidden>
    • Re: One window for all documents.
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Sorting problems with NSArrayController and a value transformer
  • Next by Date: Re: Sorting problems with NSArrayController and a value transformer
  • Previous by thread: Re: Sorting problems with NSArrayController and a value transformer
  • Next by thread: Re: One window for all documents.
  • Index(es):
    • Date
    • Thread