Procedure Library Manager
by Carl Edwards

This application is a procedure library manager, enabling library functions to be extracted from a program file and either saved individually or appended to other programs. It also allows documentation for the given routine to be viewed (and saved if desired).

When run, the application adds an icon to the icon bar. Clicking menu over this icon displays a menu containing five options, including the ususal Info and Quit options.

'Routine' leads to a submenu displaying the names of all the sections. Each of these entries leads to a submenu listing all of the routines in that section. Choosing a routine from one of these submenus results in the documentation for that routine being displayed in a window.

'Append' appends the currently selected routine to the current program. The current program is set by dragging its icon to the icon bar icon. A beep is generated when this has been done. If no program has been selected as the current program then this entry is greyed out.

'Save as' leads to a standard 'Save as:' dialogue box, allowing the currently selected routine to be saved as a file. This entry is greyed out unless a routine is selected.

If the documentation window has been closed, it can be re-opened by clicking Select over the icon bar icon. Clicking Menu over the documentation window results in the same menu being displayed as for the icon bar icon, except that the 'Save as:' dialogue box allows the documentation to be saved, rather than the routine itself.

Note: Only Basic or text files may have routines appended to them. However there is no checking to ensure that the selected routine is of the same type as the file it is to be appended to. Also, with Basic programs, no line numbers will be changed, so avoid all line number references.

Routines are installed by saving them in any subdirectory of !Library.Procedures. If documentation exists, it should be saved under the same name and in the equivalent subdirectory of !Library.Documents. It should be in the form of a text file, formatted to no more than 80 characters wide.
