2 ms·
I cannot believe how the Apple engineers implemented this feature, thinking this makes sense??? switch (menuEvent) { case FILE_SAVE_AS: NSString *
by 0x0 14y ago
I cannot believe how the Apple engineers implemented this feature, thinking this makes sense???
switch (menuEvent) {
case FILE_SAVE_AS:
NSString *newFileName = prompt_for_saveas_name();
[document writeToFile:originalFileName];
[document writeToFile:newFileName];
?!?
- kalleboo 14y agoFiles are always saved automatically in Lion/Mountain Lion. It's more like this -(void)dataChanged { [document writeToFile:fileName]; } switch (menuEvent) { case FILE_SAVE_AS: NSDocument newDocument = [initWithDocument:oldDocument] [newDocument writeToFile:newFileName]; It would be wrong for "Save As" to suddenly unsave your changes.
- 0x0 14y agoThey are even listing the return of "Save as" on the "new features" page: http://www.apple.com/osx/whats-new/features.html http://www.apple.com/osx/whats-new/features.html Quoting: Keyboard shortcut for Save As Use Command-Shift-Option-S to save a document using a different name and location. It does not say "Use Command-Shift-Option-S to save a document using a different name and location and also overwrite the existing document", even though that's exactly what it does!!! Crazy! Edit: You're right, I saved a file.txt from TextEdit, then cat'ed it from a Terminal, then edited it even without trying to save or duplicate or save as; in fact the TextEdit window still shows "File1.txt - edited", but cat shows the new contents. They shouldn't have brought back "save as" at all if this is they way they are going to handle things, much less list it as a killer feature of 10.8.
- kalleboo 14y agoDid you not read what I wrote? OS X no longer has a concept of "Unsaved changes". It's always saving your file. You write in a new sentence, it saves it (virtually) instantly. The original file was already overwritten when you selected "Save As". The new "Save As" just makes the old "Duplicate" more handy. I agree it's a poor choice of name, they should have kept it named "Duplicate".
- 0x0 14y agoYeah, after reading your post twice and confirming with cat in the terminal it sort-of makes sense. They still shouldn't list "Save as..." as a new feature, because it sounds like they made it work like every other OS. Also, the textedit window is extremely deceiving when it shows "file1.txt - edited" -- when in fact the file has already been committed to the filesystem!!
- Lockyy 14y agoThen save as should revert the original file to how it was when opened and create a new file with all the changes in that. It should forget all the autosaves for the original file.