Re: "save as" in a document based app
Re: "save as" in a document based app
- Subject: Re: "save as" in a document based app
- From: Sherm Pendley <email@hidden>
- Date: Mon, 26 Mar 2007 17:42:33 -0400
On Mar 26, 2007, at 5:10 PM, Jaime Magiera wrote:
On Mar 26, 2007, at 4:59 PM, Jerry Krinock wrote:
Here's a quick answer. If at all possible, create a new Cocoa
document-based project from scratch in Cocoa. I hope that you get
"Save As" for free. A couple months ago I "retrofitted" an
application which was originally a non-document-based application
to have "Save As", etc. It was a major conundrum for me, and, as
you have found, not well documented.
Let us know if the "easy" way does not work.
Well, that wouldn't be easy. This is the programming project I
"inherited" with several thousands lines of codes and lots of
resources, etc.
It started out as a document based app. However, I think the
previous programmer disabled the functionality of 'save as' as well
as a bunch of other save related things (even so far as to give the
'save as' key commands to a completely different function.
Well, in that case, just (re)create the "Save as..." menu item, and
connect it to the "saveDocumentAs:" First Responder action. That
action is implemented in NSDocument, and it will prompt the user for
a new location, change the name of the document, etc., and call your
data primitives when it needs to write to the new file.
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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