• 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
Multiple Document Types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple Document Types


  • Subject: Multiple Document Types
  • From: Thom McGrath <email@hidden>
  • Date: Sun, 30 Oct 2005 00:07:58 -0400

I'm trying to implement a three document type structure. This is a sample of one of the methods used to create a document simply known as "MyClass" in the example. This class is also the default, so in essence, I'm trying to mimick the default behavior.

The result is a usable class. But no window appears for it. Why? I would love to use the simpler openUntitled... methods, but those have been depreciated. What simple step am I missing? It should be noted that I do get a default window upon application launch, so my window outlet *is* connected properly.

NSDocumentController *controller = [NSDocumentController sharedDocumentController];
NSError *outError = nil;
MyClass *me = [controller makeUntitledDocumentOfType:@"MyClass" error:&outError];
if (me != nil) {
[me showWindows];
[controller addDocument:paper];
} else {
NSAlert *alert = [NSAlert alertWithError:outError];
[alert runModal];
}



-- Thom McGrath Lead Programmer of The ZAZ Studios <http://www.thezaz.com>

_______________________________________________
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: Multiple Document Types
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Predicate variable substitution
  • Next by Date: Re: Multiple Document Types
  • Previous by thread: Sync services exception: "references to the following undefined objects"
  • Next by thread: Re: Multiple Document Types
  • Index(es):
    • Date
    • Thread