709-218-7927 The Landfall Garden House 60 Canon Bayley Road Bonavista, Newfoundland CANADA A0C 1B0 |
---|
(Home) Most-Recently Used (MRU) , What is Most-Recently Used? ; AutoSave and AuditSave , The Environment , Triggers , File Save Actions , File Close Actions , What About Third-Party Triggers? , Slave Functions , What about MRUse? , FileSaveAll, FileCloseAll, FileExit , The Set Of Procedures , lSaveAs , lClose , lFolderExists , lFileExists , lFileOverwrite , mFileSave , mFileSaveAs , mFileClose , FileSave , FileClose , FileSaveAs , FileSaveAll , FileCloseAll , DocumentClose , FileExit ,
File Save Actions
On this page we will outline the actions to be taken for each of the eight possible combinations when the user issues a File Save command on a document.
Audit |
Dirty |
Named |
Action to be taken |
---|---|---|---|
Y |
Y |
Y |
Audit Save(1)Save as original file name(2)Update MRU file and list(3) |
Y |
Y |
N |
Audit Save{If SolicitNewname(4) Then{Save as new nameUpdate MRU file and list}} |
Y |
N |
Y |
Audit SaveSave as original file nameUpdate MRU file and list |
Y |
N |
N |
Audit SaveSave with a solicited file name.Update MRU file and list |
N |
Y |
Y |
Save as original file nameUpdate MRU file and list |
N |
Y |
N |
{If SolicitNewname(4) Then{Save as new nameUpdate MRU file and list}} |
N |
N |
Y |
Save as original file nameUpdate MRU file and list |
N |
N |
N |
Save with a solicited file name.Update MRU file and list |
Notes
The table splits into symmetric parts; for example, the actions taken with the audit switch ON are congruent to those with the audit switch OFF.
We ask that the MRUse data be updated on every event. This could prove costly when File Save is invoked as a result of a File SaveAll, unless some clever coding reduces the number of immediate calls to the MRUse updating code.
There are valid arguments for implementing YNY and NNY as a No Operation, We gain nothing by re-saving unless (a) the user has switched physical drives such as memory keys (b) the user wants the date-last-saved (or accessed) data to be updated. We are taking the view that since the user has expressly issued a File Save on a saved non-dirty file, that the user wants us to save the file. This argument falls down if we use this code to implement the File SaveAll trigger.
The Audit save should always preced the Regular save, because the audit save changes the document’s name, and this must be corrected by the regular save operation which follows. (Saturday, September 19, 2009: I am having doubts about this policy, since we lose the original file name if the user cancels the saveAs dialogue AFTER the auto save has changed the document name)
(1) We perform an audit save because the Audit switch is on. Prior to saving the user’s file, we save a copy with a filename based on the current date and time
(2) We re-save the file with its original (user-oriented) name, because in saving an audit copy we have changed the file’s name.
(3) We update the MRUlist (in both the listbox and the stored file of data) because in saving the original file we have at the very least changed the date-last-saved and date-last-accessed information.
(4) If the save fails (user cancels the dialog, the chosen name exists as a folder etc.) then the file will be left as a previously-saved file with its audit file name and path. I have not found it possible to strip a saved file (the now named audit copy) of its Path. The Path (and Filename) is a read-only property.
709-218-7927 CPRGreaves@gmail.com Bonavista, Saturday, April 27, 2024 8:08 AM Copyright © 1990-2024 Chris Greaves. All Rights Reserved. |
---|