Re: More Tkinter questions

Martin Green (martin.a.green@hydro.on.ca)
Tue, 7 Jun 1994 09:44:57 -0400

Steven Miale writes:
> [...]
> Since socket.read() waits for input, I first added yet another process using
> fork. The problem: it apparently caused the creation of two separate widgets,
> one of which was displayed and was using mainloop(), the other of which was
> NOT being displayed and was used by the receiver process. In other words, trying
> to add received text to the Text widget didn't work.
>
> Any suggestions on how to solve this problem?

The Tk send command was designed to provide communications between
different Tcl interpreters. You should ensure that only one process
manages the X display. The second process can use send to instruct
the first to modify the display.

Martin
_________________________________________________________________

NAME
send - Execute a command in a different interpreter

SYNOPSIS
send interp cmd ?arg arg ...?

DESCRIPTION
This command arranges for cmd (and args) to be executed in
the interpreter named by interp. It returns the result or
error from that command execution. Interp must be the name
of an interpreter registered on the display associated with
the interpreter in which the command is invoked; it need
not be within the same process or application. If no arg
arguments are present, then the command to be executed is
contained entirely within the cmd argument. If one or more
args are present, they are concatenated to form the command
to be executed, just as for the eval Tcl command.

KEYWORDS
interpreter, remote execution, send
_________________________________________________________________

Martin A. Green Net : green@rd.hydro.on.ca
Ontario Hydro Technologies Tel : (416) 207-5745
800 Kipling Ave, KR260 FAX : (416) 207-5622
Toronto, Ontario, CANADA, M8Z5S4