• 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
Programmatically Open NSDocument Based Window.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Programmatically Open NSDocument Based Window.


  • Subject: Programmatically Open NSDocument Based Window.
  • From: Bruce Cresanta <email@hidden>
  • Date: Thu, 27 Jan 2011 06:54:22 -0700

Hello,

	I am trying to open an NSDocument based window.    My NSDocument class follows the standard (MyDocument) class created using the automatic project settings.   I do initialization in the awakeFromNib override within MyDocument.

To create the document I use:

 id myDocument = [[NSDocumentController sharedDocumentController] makeUntitledDocumentOfType:@"DocumentType" error:&error];

The awakeFromNib initializations ARE SKIPPED in this call.


Does anyone know a way to initialize NSDocument other than in awakeFromNib (I have nib related bindings)?

or

Does anyone know a way to instantiate the NSDocument such that awakeFromNib is called?





Thanks,



Bruce
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Programmatically Open NSDocument Based Window.
      • From: Quincey Morris <email@hidden>
    • Re: Programmatically Open NSDocument Based Window.
      • From: Felix Franz <email@hidden>
  • Prev by Date: Re: Crash in NSPersistentDocument writeToURL:ofType:forSaveOperation:originalContentsURL:error:
  • Next by Date: Re: Programmatically Open NSDocument Based Window.
  • Previous by thread: Re: iOS Setting frame size for MKAnnotationView
  • Next by thread: Re: Programmatically Open NSDocument Based Window.
  • Index(es):
    • Date
    • Thread