Chapter 40. Send

   

Practical Programming in Tcl & Tk, Third Edition
By Brent B. Welch

Table of Contents
Part V.  Tk Details


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.


       
    Top
     



    Practical Programming in Tcl and Tk
    Practical Programming in Tcl and Tk (4th Edition)
    ISBN: 0130385603
    EAN: 2147483647
    Year: 1999
    Pages: 478

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net