

This chapter discusses how Visual Thought accomplishes the task of determining which program runs which files, or equivalently, how Visual Thought types files.

~/.vthought/TypeDictionaryEach user has his or her own User Type Dictionary. The System Type Dictionary, of which there is only one, is stored in:
INSTALLDIR/config/TypeDictionarywhere
INSTALLDIR is the Visual Thought installation directory for your site. Every Type Dictionary is a text file that you can edit. This feature may be particularly useful for systems administrators, who can configure the System Type Dictionary to recognize file types relevant to their sites.
Any line starting with
# is a comment.The first non-comment line describes the shell window within which applications can run. Some applications must run inside a shell window, either because they don't create a window themselves, or they need to take input from or direct output to a window. Examples of shell window description lines are:
cmdtool
xterm -eAll other non-comment lines describe bindings of file name suffixes to executables. They are of the form:
<needs_shell> <suffix> <exec> <args>where:
<needs_shell> = Y | N (determines whether the <exec> runs
txt)emacs). A complete path to the executableExamples of binding lines are:
Y txt emacs
N vthought vthoughtIn the first example, any attachment file whose name ended in
.txt would be run by emacs under a shell window.You can specify an empty suffix by writing
(none) for the suffix. The associated executable will be run on any attachment file that does not have a suffix (i.e., the file name does not contain a `.'). For example, the line:
Y (none) emacswould run emacs on any attachment file without a suffix.
Be careful when using empty suffixes. Because the Type Dictionaries only can recognize files by suffix type, and because they are searched before the Sun Classing Engine databases (the Sun Binder), the executable associated with a dictionary entry for empty suffixes will override any executable specified by the Sun databases.
For example, suppose the Sun Classing Engine recognizes, by content instead of suffix, files that can be run by a program called
SuperApp, and suppose that those files adhere to no standard suffixing scheme. Now suppose that in an unrelated action, you made emacs run all files without suffixes, and you stored this information in a Type Dictionary. Then Visual Thought will run all your SuperApp files that do not have suffixes with emacs, because it searches the Type Dictionaries before the Sun Classing Engine.Whereas Type Dictionaries only recognize files by their file names (i.e., by suffix), the Sun Classing Engine can recognize files according to file name as well as by content.
binder(1).The Sun Classing Engine recognizes files either by characteristics of the file names (such as suffixes) or by the contents of the files. It stores many more attributes of files, however, including the icon with which to display a file in the File Manager, and the command to print a file of an identified type.
Like the Type Dictionaries, the Classing Engine is hierarchical; an attempt to type a file goes through a multi-step process. The levels are:
~/.cetables/cetables.
/etc/cetables/cetables.
$OPENWINHOME/lib/cetables/cetables.
The Classing Engine is available only with OpenWindows on systems running Sun Solaris, and therefore Visual Thought running on systems without OpenWindows will only be able to use the Type Dictionaries for file typing.