Re: Upgrading NSDocument format, best practice
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