Chapter 40. Send
This chapter describes the send command that invokes Tcl commands in other applications. This chapter also presents an alternative to send that uses network sockets.
The send command lets Tk applications on the same display send each other Tcl commands and cooperate in very flexible ways. A large application can be structured as a set of smaller tools that cooperate instead of one large monolith. This encourages reuse, and it exploits your workstation's multiprogramming capabilities.
The send facility provides a name space for Tk applications. The winfo interps command returns the names of all the Tk applications reachable with send. The send communication mechanism is limited to applications running on one display. Multiple screens on one workstation still count as the same display on X. In UNIX, send uses properties on the X display for communication and to record the application names. As of Tk 8.0, send is not yet implemented on Macintosh or Windows. There is an extension for Windows that uses DDE to emulate send.
This chapter also describes an alternative to send that uses network sockets. The facility is not limited to a single display, and can be used in conjunction with safe interpreters to limit the capabilities of remote operations. A number of Tcl extensions provide similar functionality, including GroupKit and Tcl-DP. You can find these extensions on the Tcl archive and the CD-ROM.