TreePad allows you to run several copies of itself simultaneously, which can be very useful if you need to refer to two or more TreePad files simultaneously, or copy and paste data between them. To prevent confusion between "copy" and "instance" we will try to avoid the word "copy" and say instead that each TreePad file that you open concurrently is running in its own instance of TreePad. So the first instance of the program is used to open the first file you wish to edit.
You can open more files in more instances of TreePad if memory and system resources permit. You can open the next instance of the program in several ways as detailed in Opening and reopening a file. The results are the same.
How does the program know what settings to use? When you run the first instance of TreePad, the Options settings it uses are copied to its own memory from those stored at the end of the previous session. The next instance you open does the same, so that each open instance stores a set of options in its own memory.
So if you change Options settings in any one instance, these are applied only to that particular instance and not to any other concurrent instances. In other words, every time you open the Options window, it is instance-specific. If we open instance A, then instance B, and change B's default tab size from 0.5 to 0.8 cm, A's value remains at 0.5. So far, so good.
However, changing Options settings for any instance also alters the stored settings. While this won't have any effect on instances currently running, on opening a third instance, C, it will be found to have a default tab size of 0.8 cm, even if C was opened via a hyperlink from A! This is because C's settings are taken from settings stored (by default in the Windows Registry).
Now, if we increase C's default tab size to 1.0 cm, neither A nor B will be affected, but this setting will replace 0.8 cm in stored settings, so that on closing C and opening D, the default tab size will also be 1.0 cm.
We can now see that, each time an Options setting is altered during a session, the effect flows on, not to instances previously opened, but to any fresh instance of TreePad.
There is one other thing you should know about Options. At the end of a session, as we close the last open instance of TreePad, its Option settings become the settings stored till the next session. Thus, if A is the last instance to be closed, the first instance of the program run at the next session will have a default tab size of 0.5 cm.
In view of this, then:
- It is an advantage to be thus able to vary any of the options you select in Main menu ⁄ View ⁄ Options in each instance of the program running concurrently, since you can tailor the options to the particular needs of each file currently open. For example, you can select Auto Backup to be on for one file and not for another. You can have different default tab sizes to ensure consistency within each individual file.
- However, it is not a bad idea always to start and finish a TreePad session with the same file, and also to copy down the most important settings such as default tab sizes, etc. for quick reference should you need to reset or re-install the program.
- To force the next instance you open to have the same settings as an existing instance, open the Options menu of the instance whose settings you wish to copy and, without changing any settings, click OK or Apply to close the window. This will set the stored settings to those of the selected instance.
- You can check the Options settings of any program instance without disturbing the stored settings if you open and peruse the Options menu, then close it by clicking Cancel.
- You can force any version of TreePad to open without associating itself with the TreePad file extensions (.tpd, .hjt, .htmhjt) by adding the ⁄na switch when running it from a command line, or by adding this switch to a shortcut's command line. See Command-line switches.
Note: Although instance specificity is mentioned in several places in the manual where it is especially significant, all Options settings are instance-specific. (Search the tree using "instance-specific" to find other references.)