• 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: Upgrading NSDocument format, best practice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Upgrading NSDocument format, best practice


  • Subject: Re: Upgrading NSDocument format, best practice
  • From: Graham Cox <email@hidden>
  • Date: Thu, 17 Sep 2009 00:48:18 +1000


On 17/09/2009, at 12:36 AM, Markus Spoettl wrote:

I don't really know if its save to do what I do.


I do a similar thing when I open a new untitled document but which is in reality a template file. I simply open the template file as normal then knock its URL on the head:

NSDocument* newDoc = [[NSDocumentController sharedDocumentController] openDocumentWithContentsOfURL:url display:NO error:&outError];

[newDoc setFileURL:nil];



So far I haven't experienced any problems and it prompts for save just like any untitled document would.


--Graham


_______________________________________________

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: Upgrading NSDocument format, best practice
      • From: "I. Savant" <email@hidden>
References: 
 >Upgrading NSDocument format, best practice (From: Markus Spoettl <email@hidden>)
 >Re: Upgrading NSDocument format, best practice (From: "I. Savant" <email@hidden>)
 >Re: Upgrading NSDocument format, best practice (From: Markus Spoettl <email@hidden>)

  • Prev by Date: Re: getline 'free' problem
  • Next by Date: Re: Upgrading NSDocument format, best practice
  • Previous by thread: Re: Upgrading NSDocument format, best practice
  • Next by thread: Re: Upgrading NSDocument format, best practice
  • Index(es):
    • Date
    • Thread