Files saved when focus lost

Files saved when focus lost

1
NewbieNewbie
1

    Aug 30, 2004#1

    My UE v10.20a saves a modified file EVERYTIME I switch to another tab or when the application losts focus. The "autosave every
    n minutes" settings have no effect on this problem. Does anyone know how to disable this?

    1
    NewbieNewbie
    1

      Oct 22, 2004#2

      Was there ever a solution found for this?
      Thanx, Bob

      2
      NewbieNewbie
      2

        Feb 10, 2005#3

        I just ran into this as well.  I found my files were automatically being saved when I switched to another file in UE.  Is there a setting to turn this off?

        Thanks

          Feb 21, 2005#4

          I got a non-forum message telling me that I had set the configuration to edit the files WITHOUT a temp file. I checked, and that was the problem. I had intended for it to edit a file without the .bak backup file. I changed the config to edit with a temp file and set the backup tab to edit without a .bak file.

          Life is good.

          8

            Feb 05, 2009#5

            Hrmm... I came here looking for a similar answer. But it seems now that it was trying to auto-saving unnamed files after the time limit. So I checked the "Do not auto-save unnamed (new) files" box under File-Handling/Backup (version 12.20b+1).

            My usual problem, PIBCAK.
            Quantum Mechanics: The dreams stuff is made of.

            1
            NewbieNewbie
            1

              Oct 25, 2019#6

              I came to this post looking for an answer, but UltraEdit has a configuration Setting  Advanced - Configuration Setting - Editor - Advanced.  There's a check box for "Auto-save modified documents when application loses focus".  The way I understand this setting, if it is checked and you leave UltraEdit by switching to another open application or desktop, the modified file will be saved.  If you leave un-checked - it should not save the modified file because you switched off of the UltraEdit application.  With all this said, no matter how I check this box, moving off of UltraEdit saves a modified file.  

              6,675585
              Grand MasterGrand Master
              6,675585

                Oct 25, 2019#7

                The configuration setting Auto-save modified documents when application loses focus at Advanced - Settings or Configuration - Editor - Advanced was introduced with UltraEdit for Windows v13.00 and UEStudio v6.20 released March 2007. So this setting did not exist as dome created this topic August 2004 with using UltraEdit for Windows v10.20a.

                This configuration setting works as designed and explained by help of UltraEdit v26.20.0.46. A modified file opened with usage of a temporary file is not saved on switching to another application for example with Alt+TAB with this setting not checked and is saved with this setting checked in configuration.

                The file saving behavior is different on not using a temporary file because of
                • the file is very large and the user decided to open it without usage of a temporary file on being prompted by UltraEdit for faster opening and editing the large file or
                • the chosen configuration at Advanced - Settings or Configuration - File handling - Temporary files resulted without or with a prompt to open the file without usage of a temporary file.
                The help page opened on clicking the button Help in Temporary files configuration dialog contains the warning:

                WARNING - If this option is selected, all changes are permanent!

                Well, this warning is not 100% correct because of all changes are not permanent. All modifications like inserting a text or removing a text done within the byte range of the file content currently loaded into the file buffer are just done on the bytes in file buffer. So these changes on data in file buffer are not written immediately to storage media and can be undone and redone even on not using a temporary file.

                But UltraEdit/UEStudio flushes always the file buffer to storage media on input focus leaves the document window of the file opened without usage of a temporary file. So any modification on file opened without usage of a temporary file is saved on input focus is switched to another application or just another window inside UltraEdit like another file window or a view like File View or Output Window or a dialog window like the Quick find or the Find and Replace window. This can be seen easily by opening a file without usage of a temporary file, insert a space and delete it resulting in a red dot indication on file tab for not saved modifications on file and press next Ctrl+R to open the Find and Replace window with switching input focus to the Find what edit field on tab Replace. The file respectively file buffer is saved to storage media indicated immediately with a green dot on its file tab.

                So I recommend to open Advanced - Settings or Configuration - File handling - Temporary files and make sure to have either Use temporary file for editing (normal operation) selected or one of the two other options with setting Threshold for above being set for example to 20480 KB (more precisely KiB which is 20 MiB in this case). The usage of second or third option with default threshold value of 0 is definitely a very bad idea as this results in even small files with just some bytes are opened without usage of a temporary file and therefore saved on every loss of input focus on file window.

                BTW: On having selected the first option Use temporary file for editing (normal operation) (default) and Threshold for above has the default value 0 KB, UltraEdit prompts the user how to open the file if its file size is 50 MiB or larger - without or with usage of a temporary file.

                UltraEdit opens a file without usage of a temporary file if it fails to create a temporary file. The reasons can be:
                1. The directory Restore in directory of used INI file cannot be created or is write-protected or it is not possible to create one more file in this directory.
                  The INI file is by default stored for UltraEdit in %APPDATA%\IDMComp\UltraEdit and for UEStudio in %APPDATA%\IDMComp\UEStudio.
                  The directory Restore is the default directory for temporary files since UltraEdit for Windows v25.20 and UEStudio v18.20 introducing the Session options for saving state.
                2. The directory defined manually in INI file of UltraEdit/UEStudio for temporary files cannot be created or is write-protected or it is not possible to create one more file in this directory.
                3. The environment variable TEMP is not defined at all on starting UltraEdit < v25.20 or UEStudio < v18.20.
                4. The directory %TEMP% cannot be created or is write-protected or it is not possible to create one more file in this directory.
                See also:
                Best regards from an UC/UE/UES for Windows user from Austria