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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to