The Thor Framework: tools to make tools
Thor provides a framework of tools to assist in creating tools.
Each of the tools in the framework can be obtained from a single line of code that looks like this:
Result = Execscript (_Screen.cThorDispatcher, cParameter)
This rather unusual approach was chosen because it achieves two goals:
- The tools in the framework are available with only the single dependency (the name of the property in _Screen) and thus can be accessed by tools regardless of the folder where Thor is installed.
- The tools in the framework are available even after a ‘Clear All’.
Note that the tools in the framework are always available from the Thor menu in the VFP system menu, and you can copy the line of code to access the tool directly from there. Furthermore, if available, there is access to the home page for the tool.
The structure of Thor provides for the inclusion of other objects embedded in APP files. In particular are these two, developed as part of PEM Editor.
|Class= editorwin from pemeditor
||Methods to access and modify the text in the currently open editing window (Select, Cut, Copy, Paste, etc ...) - see
Thor EditorWindow Object
|Class= tools from pemeditor
||A collection of various methods, not related to each other, but of value beyond their use in PEM Editor – see
Thor Tools Object
||Returns an object used to create context menus - see
||Returns an object so that forms can save their settings (size, position, etc) and align the form to the mouse or cursor position – see
||(documentation not yet available)
||Returns the name of Thor’s tool folder
||Returns an object so that an APP can self-register its own tools, such as is done by
PEM Editor 7.
||Runs Thor. Same as Do Thor with ‘Run’ or Do RunThor
||Opens Thor form. Same as Do Thor with ‘Edit’
||Removes all Thor-assigned keyboard macros so that a macros (FKY) file can be saved