• 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
Re: What, exactly, makes a Cocoa project document-based?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What, exactly, makes a Cocoa project document-based?


  • Subject: Re: What, exactly, makes a Cocoa project document-based?
  • From: Scott Thompson <email@hidden>
  • Date: Fri, 17 Jun 2005 21:32:04 -0700


On Jun 17, 2005, at 9:22 PM, Rick Hoge wrote:


I've done a lot of stuff with Cocoa doc-based apps, but recently had kind of an existential question:


When you select 'Cocoa document-based application' as a new project type, what are all the specific elements added to make it this kind of app?

So what else is done specifically for a document-based app?

Another thing I can think of is that it sets up the document types in the application target settings so that the system is aware of the main document class.


Where does the NSDocumentController come from?

The document controller is created by the NSApplication. I suspect the document controller is either created lazily (when the first document is added) or is always present, even in non-document based applications and is simply unused.



Thanks very much for any comments on this - I am considering modifying some programs which are currently based on the standard multi-document/multi-window template to use a single-window organizational view for multiple documents and this question came to mind.

There was a WWDC session on advanced document architecture techniques that specifically addressed the act of creating a document with a single window capable of handling multiple documents. As I recall, the basic technique involved allowing Cocoa to create an NSWindowController for each document, but then redirecting the NSDocument object to use a single, common NSWindowController for the shared window.


The session went into some detail about which methods of NSDocument and NSWindowController you have to replace, or otherwise modify to get this behavior. Unfortunately, I don't have any notes from that session but you may be able to find others that do.

Scott

_______________________________________________
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: What, exactly, makes a Cocoa project document-based?
      • From: mmalcolm crawford <email@hidden>
    • Re: What, exactly, makes a Cocoa project document-based?
      • From: Rick Hoge <email@hidden>
References: 
 >What, exactly, makes a Cocoa project document-based? (From: Rick Hoge <email@hidden>)

  • Prev by Date: What, exactly, makes a Cocoa project document-based?
  • Next by Date: Re: What, exactly, makes a Cocoa project document-based?
  • Previous by thread: What, exactly, makes a Cocoa project document-based?
  • Next by thread: Re: What, exactly, makes a Cocoa project document-based?
  • Index(es):
    • Date
    • Thread