Setting an NSDocument location programmatically (the answer)
Setting an NSDocument location programmatically (the answer)
- Subject: Setting an NSDocument location programmatically (the answer)
- From: Matthew Weinstein <email@hidden>
- Date: Fri, 25 Mar 2005 09:12:13 -0500
Thought I should share what I've found that works for saving a document
programmatically.
newFile = [dc openUntitledDocumentOfType: theType display: YES];
/*
put any manipulations of newFile here
*/
[newFile writeToFile: myLocation ofType: myType];
[newFile setFileName: myLocation];
[newFile saveDocument: nil]; //seems superfluous, but
actually sets a whole bunch of internal variables
Matthew Weinstein
Associate Professor of Science Education
Kent State University
404 J White Hall
Kent, OH 44242
email@hidden
330 672-0653
_______________________________________________
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