Previous 1 2 Next 28 Replies Latest reply: Aug 4, 2013 8:03 AM by D.McG. Go to original post
  • KAMIKAZE[UA] Level 1 Level 1 (0 points)

    Not work for me. 10.8.2, last xode... even not work in any other app like TextEdit.

    I've set  ApplePersistence -bool no  for many apps.  Also rebooted. No luck.

  • D.McG. Level 1 Level 1 (10 points)

    So, shortly after I posted my last message, I noticed it only partially worked (not when closing Xcode). Sorry about that.

     

    The real solution for me was to change it globally (with 10.8) which is what I really wanted anyways:

     

    1) Open the Settings app.

    2) Open the General panel.

    3) Check "Ask to keep changes when closing documents"

     

    Hope this helps!

  • KAMIKAZE[UA] Level 1 Level 1 (0 points)

    Thank you very much! It's works!

  • yudieg Level 1 Level 1 (0 points)

    I noticed that even after you check the "Ask to keep changes when closing documents" the file modified date has changed right after you click the close button and reverted back after you clicked the revert changes. I have proven this by canceling my editing on my Dropbox' file, it create many revisions for something that supposed to  not changed.

     

    This behavior is unacceptable and somewhat irritating. XCode (and maybe all other Apple app)  actually & aggressively save the changes and only revert it back if you click the Revert Changes button. Clicking Cancel button also did not work as it should. It save and close the window just like you click Save button.

     

    Why not just simply don't touch the file unless user hit the save button like it used to.

    Why Mr. Craig Federigh, why?

  • startswithj Level 1 Level 1 (0 points)

    The suggest solution isn't working for me.

     

    I have selected "Ask to keep changes when closing documents" in System Preferences / General.

     

    I open an Xcode project, I make a change, I build and run to see the effect, I close the project (not wanting this temporary change to save), and I am not asked whether to save my changes. If I reopen the project, I see the change was saved.

     

    If I make a change and do not build/run, I *am* asked whether I want to save changes upon closing the project.

  • D.McG. Level 1 Level 1 (10 points)

    Building requires the file to be saved.  You cannot build the project with the changes without saving first, so Xcode implicitly saves your files when you click build (think of it as Save and Build).  So essentially there were no changes to save upon closing the project; they were saved already.

     

    It may not be what you want, but this is the current behavior.  Just be aware of it.

  • Stokestack Level 1 Level 1 (0 points)

    D.McG. wrote:

     

    So essentially there were no changes to save upon closing the project; they were saved already.

    That's not a safe assumption at all.  What if you close the project without building it?

  • HyperNova Software Level 6 Level 6 (8,165 points)

    I've been using Xcode for over 3 years now and have yet to lose any text I've entered.

    And this includes those times when Xcode decides to go belly-up at the worst possible time.

    YMMV.

  • K T Level 7 Level 7 (23,700 points)

    This is code work....where revisions are routinely tracked (you do use source control of some ilk, right?) and it's assumed you want to do what you do.

     

    This isn't PaintWorks Deluxe Home Edition Pro, where an application insists on asking if you're really sure about being sure you're sure that you're sure you want to do anything ever without a minder making sure you really want what you just said you want...for sure.

  • Stokestack Level 1 Level 1 (0 points)

    That makes no sense, because saving is the safer option.  It only needs to ask once (especially if, as you suggest, you have old revisions in source control).

     

    But the source-control argument is flawed, if for no other reason than that its integration in Xcode is wholly unreliable.  Anyone who relies on its GUI for source-control operations or status is really asking for trouble.  And this is with simple projects in a single-user environment.

     

    Second, it is a cross-platform standard in applications of all types and expertise levels to ask whether you want to save unsaved changes when you try to quit the app without doing so.  Continuing to try to find excuses for not doing so is infantile and pointless.

  • K T Level 7 Level 7 (23,700 points)

    You still seem to be reacting as if you're using a broad market consumer-level application. Xcode is a derived IDE, not some hand-holding text editor. The sooner the light goes on that to use it means to have your feet under you, the sooner you'll be able to relax behind it.

  • JadePraerie Level 1 Level 1 (0 points)

    K T wrote:

     

    …This isn't PaintWorks Deluxe Home Edition Pro…

    …You still seem to be reacting as if you're using a broad market consumer-level application…

    …The sooner the light goes on that to use it means to have your feet under you…

     

    Dear @KT, please note: https://discussions.apple.com/static/apple/tutorial/etiquette.html

     

    Specifically:

    • Be polite, constructive, and stay on topic.

     

    Cheers.

  • K T Level 7 Level 7 (23,700 points)

    Did you have a technical question we can help you with?

  • D.McG. Level 1 Level 1 (10 points)

    If you close the project without building it, and followed my previous answer to the original poster's question of enabling "Ask to keep changes when closing documents" in System Preferences, then you will be asked to save.

     

    My last post was in regard to the implicit save if one starts a build.  If you start a build, it will automatically save your changes; regardless of the system preference. Desirable or not, that is the current functionality. Building the code currently in the editor requires the saving; since other background processes are involved in building.

Previous 1 2 Next