X11TclDoc.tioga
Copyright Ó 1992, by Xerox Corporation. All rights reserved
Created by Christian Jacobi, January 28, 1992
Christian Jacobi, June 19, 1992 3:24 pm PDT
Summary
Tcl in general
Tcl is a "tool command language" desined by John Ousterhout. It contains a general interpreter, C language interfaces so this interpreter can be embedded in C programs. It contains a simple X11 toolkit Tk. Most important to us, Tk has a relatively simple convention how otherwise independent applications can communicate.
John Ousterhout dreams of simplifying applications a lot because they need to do the basics only, and, delegate certain functions to other more specified applications. I share his dream in parts. However thanks to dynamic loading, definition modules and shared adress space Cedar has accomplished this long ago. Instead of being interested in general simplifications I am interested in cross language operations which enrich the functionality of the systems.
This Cedar package
X11Tcl is a package which supports Tcl/Tk's remote execution or communication convention. While it itself does not support general Tcl interpretation it allows to send commands to registered Tcl interpreters. It also allows to register interpreters from Cedar. These interpreters might not implement the Tcl-language (as no real interpreter is delivered), but they can nevertheless implement specific Tcl commands.
This approach lets us use the main benefit of Tcl, without paying the cost of opening up unsecure turing-complete interpreters. This separation of communication means from general interpreter is made on purpose. If a later implementor wants to offer a general Tcl interpreter to Cedar, this shall not be automaticlay integrated into the communication convention.
What we hope to achieve
Simple unix shell scripts shall be capable of checking whether a Cedar environment is alive. Scripts shall be able to start up a cedar world and share it. Last, the shell scripts shall be able to issue certain commander commands. This could make Cedar transparent to C hackers and make Cedar more widely used within PARC.
Interfaces
X11Tcl is the general interface to issue commands and to register interpreters.
All interfaces are well documented right in the definition modules.
User tools
There is an experimental sender widget... It is recomended for debugging purposes only.
Commander Commands
TclCommander
Creates a Tcl interpreter named "CedarCommander" which delegates all received requests into a Cedar commander. This is inherently unsafe as all Cedar commands are made available.
Options
-display x-server-name
x server to use; default = use environment variable
-interp tcl-name-of-interpreter
interpreter name to use; default = "cedar"
-force
overwrites already registered remote interpreter
-noforce
does not overwrite already registered remote interpreter
-detach
prevents woirld from disappearing after all commands are executed
Bug or Warning
Cedar uses the root window of screen zero
Tcl uses the root window of any screen
Consequence: Communication works only with a version of Tcl running on screen zero, independent on which screen Cedar runs.
I believe Cedar does the right thing and Tcl made a bad choice. Of course Ousterhout has a bigger hammer, but I'm not sure he knows he made a choice at all.
If you have some spare time please help
Feedback please
Feedback please
Feedback please
Possible directions to take; problems
@ Survive the destruction of the hidden window.
@ Add procedure to receive timed out replies. Sending commands would need a means so client can find out which delayed reply belongs to what timed out command.
@ I do NOT believe a general Tcl interpreter is necessary in Cedar. BTW: porting Tcl into PCR is not that simple (or powerful) unless Tk is ported also (and therefore Xlib ! ).
@ How shall we face different versions of the Tcl protocol (right now there aren't).
@ Do local shortcuts. Think about timeout for local shortcuts.