Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Xcode 4.2 not ask to save changes

Why xcode 4.2 will not ask: "to save changes or not", for example when I delete \ altering anything in the StoryBoard and elsewhere? Wen I close xcode, it's just save any changes I did, but I do not want to do this. That's bad, I can do any modifications in my project and then just hit close button and it's will be saved without any warning messages, but if i do not want to save?

Xcode 4.2-OTHER, Mac OS X (10.7.1)

Posted on Jan 15, 2012 9:13 AM

Reply
28 replies

Mar 8, 2012 4:07 PM in response to Llessur999

Llessur999 wrote:


KT is pointing you to the very first first preference, Xcode > Preferences > General > Auto-save.

No he isn't. Those links just go the introductory pages, which say nothing about this. As usual for him.


There is no preference for this in Xcode, which is probably WHY THIS GUY ASKED.


This situation is a lot worse than simply not asking to save a file. Lion is deleting work.


Last night I typed a non-trivial paragraph of code into a source file. And saved it. I hit Command-S after every line of code, no exaggeration. A few minutes later, I was scrolling up and down madly looking for it and couldn't find it. In case I accidentally put it in the wrong file, I searched the whole project for a string I knew I'd used. Nowhere to be found.


Suddenly Xcode presents a dialog complaining that it couldn't autosave the file because it had been modified externally. Did I want to "revert", or save what was in the editor?


I've been seeing these dialogs on both my machines intermittently for weeks. Same versions of everything on each system: OS, dev tools. Same project. Usually I opt to save what's in the editor, thinking that it must be the correct version. Well now I know otherwise. I hit "Revert", and the block of code magically reappeared on my screen.


No, there was nothing else running that could've deleted code. At least, not anything visible.


But it occurred to me that this might be Lion file-management crap gone seriously and dangerously wrong. And now that other people are reporting the same thing, it looks like that suspicion is being borne out.

Mar 8, 2012 10:29 PM in response to etresoft

Lets take Eclipse, Netbeans, delphi or even textedit.

When we open any file and make some changes then just hit close button, to exit from it, what will happen next?

Why xcode does not do the same? Not ask: would you like to save? It just close and save. This is stupid. I've use svn, but this not gonna help. I do not want manually commit every changes i did, becase xcode can just kill it.

Mar 9, 2012 6:57 AM in response to KAMIKAZE[UA]

KAMIKAZE[UA] wrote:


Lets take Eclipse, Netbeans, delphi or even textedit.

When we open any file and make some changes then just hit close button, to exit from it, what will happen next?



I assume Eclipse, Netbeans, and Delphi will interrupt you and ask if you want to save those files. They do this because that is the way Apple designed it years ago and they all copied Apple.


TextEdit in Lion is different. If you haven't ever saved the new file, then you will be prompted to give the file a name and location. If it is an existing file, the the document will just be closed. In a few years, Eclipse, Netbeans, and Delphi will likely work the same way.


Why xcode does not do the same? Not ask: would you like to save? It just close and save.


Because that is the way it is designed.


This is stupid.


That's your opinion. Most developers would never make changes to a file and then close it without saving. Typically, we make some changes and then test it, repeating the process until it all works. At that point, we will commit the working version into a source control system. The problem is that you can't test it without saving it.


If you don't like it, you are free to use any other development system. Unfortunately, there are very few. If Xcode's behaviour were as bad as all that, there would be a market for competition. There isn't. Ergo, you are going to have to live with it.


becase xcode can just kill it.


What are you talking about?

Mar 9, 2012 7:11 AM in response to etresoft

etresoft

here is the deal to you:open in xcode any your's BIG project and open any "hard" xib file or .m file and just delete ALL inside of it (command+a -> DEL ), and then click [x] on xcode project window. As result, you have cleared your file and xcode even not ask about it, it's just automatically save empty file.

I wish a simple configured option in xcode - that can set\unset popup dialog that asking what to do with changes, when we close xcode.

Mar 9, 2012 9:12 AM in response to KAMIKAZE[UA]

KAMIKAZE[UA] wrote:


here is the deal to you: open in xcode any your's BIG project and open any "hard" xib file or .m file and just delete ALL inside of it (command+a -> DEL ), and then click [x] on xcode project window. As result, you have cleared your file and xcode even not ask about it, it's just automatically save empty file.


OK. I asked Xcode to do something and it did exactly what I asked. What's wrong with that? Maybe I wanted to start over. If I change my mind, I can always click "Revert".

I wish a simple configured option in xcode - that can set\unset popup dialog that asking what to do with changes, when we close xcode.


It is even easier than that. Your changes are saved. No configuration options to setup.

Xcode 4.2 not ask to save changes

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.