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 Close 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 Close command on a document.
Audit |
Dirty |
Named |
Action to be taken |
---|---|---|---|
Y |
Y |
Y |
Audit SaveIf SolictSaveChanges(1) Then{Save as original file nameUpdate MRU file and list}(No) Close SaveNoChanges(Cancel) |
Y |
Y |
N |
Audit SaveIf SolictSaveChanges(2) Then{If SolicitNewname Then{Save as new nameUpdate MRU file and list}}(No) Close SaveNoChanges(Cancel) |
Y |
N |
Y |
Close SaveNoChanges(3) |
Y |
N |
N |
Close SaveNoChanges(3) |
N |
Y |
Y |
If SolictSaveChanges(1) Then{Save as original file nameUpdate MRU file and list}(No) Close SaveNoChanges(Cancel) |
N |
Y |
N |
If SolictSaveChanges Then{If SolicitNewname Then{Save as new nameUpdate MRU file and list}}(No) Close SaveNoChanges(Cancel) |
N |
N |
Y |
Close SaveNoChanges |
N |
N |
N |
Close SaveNoChanges |
Notes
(1) In general such a solicitation can result in a tri-way response of Yes/No/Cancel, and the Cancel result is of great interest in situations such as File CloseAll or File Exit. If the user responds “yes”, then we go ahead and try to save changes. If the user responds “No” we do not save the file, but close it. If the user responds “Cancel” we do not save the file, we do not close the file; we abandon all processing and return control to the user immediately.
(2) The problem here is that “save changes” will not be showing the original file name, that having been superseded by the audit file name.
(3) The logic here differs from that for File Save. File Save is an interval in the use of an open document; user-processing can continue after the File save trigger is completed, but File Close terminates the existenc eof the open document. If the document is not dirt, what is to be gained by making an Audit Copy? Or should the same rules apply as for File Save?
In all eight cases our aim is to reduce the triggers to that of the equivalent File Save if the user has elected to save changes, and then complete the trigger with a standard close-without-saving-changes.
What About Third-Party Triggers?
709-218-7927 CPRGreaves@gmail.com Bonavista, Saturday, April 27, 2024 8:08 AM Copyright © 1990-2024 Chris Greaves. All Rights Reserved. |
---|