• 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: Programatically initializing documents.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programatically initializing documents.


  • Subject: Re: Programatically initializing documents.
  • From: Nick Zitzmann <email@hidden>
  • Date: Tue, 11 Nov 2003 22:24:10 -0800

On Nov 11, 2003, at 8:58 PM, Cory Knapp wrote:

What is the proper way of going about this?

NSDocumentController *controller = [NSDocumentController sharedDocumentController];
SomeDocument *document = [controller makeUntitledDocumentOfType:@"SomeDocumentsType"];
[controller addDocument:document];

...where "SomeDocument" is the name of the document class, and "SomeDocumentsType" is the document's type as mapped to the document class in the application's Info.plist. Then you can pass messages to it...

Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page: http://seiryu.home.comcast.net/
S/MIME signature available upon request

"I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone." - Bjarne Stroustrup
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Programatically initializing documents. (From: Cory Knapp <email@hidden>)

  • Prev by Date: Re: Correct way to get a person in Address Book
  • Next by Date: Detecting a failed drag and drop outside of view
  • Previous by thread: Programatically initializing documents.
  • Next by thread: Re: Xcode / Interface Builder Bug?
  • Index(es):
    • Date
    • Thread