Next | Prev | Up | Top | Contents | Index

Send Primitive

Tk contains a primitive called send. In Tk, each interpreter has a name, and you can send Tcl commands from one interpreter to another. When an interpreter receives a sent command it executes the command, and then returns any result back to the original interpreter. Tm also contains this mechanism, so that applications can send commands to other Motif and Tk programs, and receive commands from both Tm and Tk programs.

Once a Tcl Motif application succeeds in registering its name at XtAppInitialize time, it can send commands to another Motif or Tm application. This example instructs interp2 to display a message:

send interp2 {puts stdout "hello there"}


Next | Prev | Up | Top | Contents | Index