Mesquite modules can save and load preferences using some methods of MesquiteModule.
Note: preferences are used by very few modules at present (e.g., the Mesquite trunk module, ManagePAUP), and the system is not easy enough to use. For instance, it may be better to base the preferences on NEXUS formatted text commands, and have the preferences system use the doCommand method. Also, there is not a single easy way for a module to have a UI to set preferences. Because it would be too cluttering for each module participating in a calculation to request a menu item by which to set preferences, it will be useful to design a single preferences window with panels for the different modules involved in a window's calculations.
A module calls "storePreferences()" when it wants to store its preferences. Mesquite then prepares a file "prefs" in the module's directory. Mesquite calls the methods savePreferences() method, which is to return a String containing the module's preferences, and this String is written into the file.
A module calls "loadPreferences" when it wants to read its preferences (e.g., in startJob). In response, Mesquite reads the module's pref file and passes the contents as a String to the modules "processPreferences" method.