416-621-9348 cgreaves@chrisgreaves.com Visit www.ChrisGreaves.com for this image! Chris_GEDC1894_Head (Small).JPG
Home Services Products

(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 ,

Triggers

Triggers are the events that cause code in MRUse to be executed. Let’s classify and look at a few examples.

User Triggers

(Commands from the menu, Buttons from the toolbars, shortcut keyboard commands)

File Save, File saveAs, File saveaLl, Ctrl-S and so on.

File Close, File Closeall, Ctrl-F4 and so on.

File eXit, Alt-F4..

System Triggers

Auto save, Audit save

Third-Party Triggers

Under.SaveAsSelection, Under.SaveAsSelectionTitlecase, WbWrd,

Impact of Triggers

Each trigger may result in no action, a save action, or a close action depending upon several factors:

The Trigger event itself

Whether or not the document has been previously saved

Whether or not the document is Dirty (the content has changed since the most recent save)

Whether or not the Audit switch is turned on

Apart from the trigger event, the remaining three factors are binary, thus we have eight possible combinations of those three remaining factors.

Thus for any trigger event we can classify the action to be taken according to the eight possible combinations.

Audit Dirty Named Action to be taken
Y Y Y
Y Y N
Y N Y
Y N N
N Y Y
N Y N
N N Y
N N N

In these notes we will work through two triggers - File Save and File Close - in detail. The remaining triggers should be self-evident (don’t you hate that!) after the first two worked examples.


Loading

Toronto and Mississauga, Sunday, December 05, 2010 3:30 PM

Copyright © 1996-2010 Chris Greaves. All Rights Reserved.