The ModeLock file
-left click on StrongED's iconbar icon will open the ModeLock file which appears as below.
The ModeLock file is in !StrED_cfg.UserPrefs.Global.ModeLock
StrongED populates the ModeLock file automatically, when it is started, from the modes installed. So if you add a new mode, it will appear automatically in the ModeLock file. If you delete a mode, StrongED will automatically remove the relevant line, but only when quit and restarted. This feature works in 4.69 and 4.70.
Each column (except for Extra mode) may have A, N or Y against the mode name. A means Ask. N means do not allow. Y means Alow the action. Anything other than these characters is treated as N.
This ModeLock file controls how the modes therein defined react in various conditions:
- This is the name of the mode to which the line applies. There are more modes available than are shown here: modes not listed in this file will be opened in BaseMode and will otherwise behave as BaseMode. You can delete lines which have no mode.
- This defines whether the mode concerned should be accessible from the main Create File m -> New File -> Modes list or from the Extramode list.
A 'Y' in this column causes the mode to show in the Extra modes menu. 'Y' means yes and an 'N' means no. To move a mode to Extra modes simply change the 'N' to a 'Y'.
Of course, if you do not use a mode you can delete it. StrongED will automatically remove the relevant entry in the ModeLock file.
- This controls whether or not an obey file called 'InitMode' is allowed to be run. A mode can use a ModeInit file to perform additional initialisation. The facility is currently used only by StrongHTML mode to ensure the toolbox modules required by its add-ons. (4.69 and 4.70).
- This controls the list of functions which may be tied to the OnLoad keyword in the ModeFile. If N, then the list is not allowed to be executed. Set it to Y to allow execution when loading a file. The facility is currently unused (4.69 and 4.70) as no supplied ModeFiles contain the OnLoad section. If such a section were to be added, then the ModeLock file would be consulted before it is executed.
- This controls if the Process function, which usually calls external code, is allowed or not.
- This controls if the Run function, which usually calls external code, is allowed or not.
- Process and Run are used by lots of modes. For example, BASIC mode uses Process when Return is pressed, it calls an add-on that ensures that keywords are in uppercase. It uses Run when you doubleclick on a LIBRARY statement to load the library file.
Was this page helpful? Please email me and/or rate this page:
If you want a reply make sure any email address @torrens.org will not get spam-binned!
Other relevant pages
Top of page
Document URI: http://stronged.torrens.org/man/modes/modelock.html
Page first published Thursday the 7th of June, 2018
Last modified:Mon, 18 Mar 2019 16:34:52 GMT
© 2018 - 2020 Richard Torrens.