[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Tcl/Tk with CLISP (was Re: Multi-return value functions and



   From: Oliver Andrich <andrich@informatik.uni-koblenz.de>

   By the way, can you use the whole power of lisp when using your
   method? As I understand you write a Tcl/Tk program that calls Lisp to do

I believe so.  Whatever Tcl sends to the Lisp process is sent through
EVAL.

There are three limitations that I know of to the technique I'm using:

- If there's an error on the Lisp end, the whole deal dies hideously.
This could probably be fixed from Lisp by altering the error behavior.

- Wish assumes there will be a fairly quick response.  I'm not sure
what happens if it tries to read from the Lisp process when nothing
has been returned yet.

- Wish reads only the first line that gets printed out as the return
value, although this may be arbitrarily long.  One should watch out
for pretty printing or shorthand (e.g., # for a deep sublist).

   some nice things, that means you have to write program in Tcl/Tk doing
   the displaying and you have to write a program in Lisp to do the rest.
   Is that right? If that is the fact, then I no that this isn't the way
   I want to do it. I want to write a Lisp program that simply sends
   messages to the wish-Task, so that I have to learn as little as
   possible of Tcl/Tk. (It's hard enough to fight Lisp. :-)

Well, this should work fine, if your task is event-driven.  (A
reasonable presumption if you're using Tcl/Tk.)  Every time an event
goes off, Tcl asks Lisp what to do with it, and Lisp replies.

+-     PETER DUDEY DRAKE      279-D SE Lilly Ave.,  Corvallis, OR  97333     -+
|       MS student in Artificial Intelligence, Oregon State University        |
|                   Where I come from, we're ALL like this.                   |
+-  drakep@research.cs.orst.edu        (finger dudeyp@research.cs.orst.edu)  -+