Message-Id: <IdDvRfgB0bE_87aBRm@corvina.parc.xerox.com> Date: Fri, 6 Dec 1991 09:46:19 PST From: Brent Welch <welch@parc.xerox.com> To: connolly@pixel.convex.com Subject: Re: documents, files, types, and access methods Cc: wais-talk@think.com, www-talk@nxoc01.cern.ch, tcl@allspice.berkeley.edu In-Reply-To: <9112051816.AA29899@pixel.convex.com> The model that TCL has it that each tool has an embedded TCL interpreter, and tools can issue commands to each other in the TCL language. TCL is designed to be simple for simple things, and it is fully programmable. TCL provides basic language features, and the application that embeds an interpreter can define new commands, either as C procedures or as TCL command procedures (scripts). For example, the Tk X toolkit defines a number of TCL commands to create widgets, so it is possible to write window programs with a script. Since each window (ideally) has a TCL interpreter behind it, you can control your tools by sending around TCL commands. This is a more powerful alternative to using mail header formats for messages. You can send whole programs, not just commands. The way I use this currently is to couple a control panel with a shell window. The control panel is put together as a TCL/Tk script that uses the Tk toolkit to display buttons, etc. Clicking on buttons in the control panel can cause messages to be sent to the terminal emulator (tx). One very useful command passes a string along to the shell running in the terminal emulator. In this way I can create buttons that run commonly used programs. Other commands control the terminal emulator itself, such as its size and placement on the screen, the message in its status line, etc. The whole model of a bunch of tools that have a common language and can fire off commands to each other is very powerful. Brent Welch