HDTenEightyP/NetNews huggingface dataset:
From: t4mhoff@srv.PacBell.COM (Todd Hoff)
Newsgroups: comp.lang.tcl
Subject: On thanx, SQL, Lex/Yacc, and perl
Keywords: n
Date: 6 Apr 92 21:58:53 GMT
Article-I.D.: PacBell.1992Apr6.215853.10020
Distribution: all
Organization: Pacific * Bell

Thanx for all the help on adding commands to tcl.
I've done it and it works :-) The method is somewhat
similar to a technique I used to provide generic hooks
into a reusable parse tree.  

Please endure a few more questions.

Does anyone have a tcl interface for:
1. SQL accesses. Preferably Oracle.
2. Building Lex/Yacc type programs.

Any ideas on the best method of building any of the above?

And now a speculative question. When perl becomes
embeddable in the next release, which would be better to
use, tcl or perl? The probable answer is it "depends," but
on what? I like the clean design of tcl, yet perl is
more widely used (I think). I know people have worked hard 
on both tcl and perl so I hate to make it a competition.
It is, however, hard to get others to learn more than
one tool. A standard would be nice.
-- 

Thanx
Todd
Newsgroups: comp.lang.tcl
From: bytor@ctt.bellcore.com
Subject: Non-Tk based send command
Organization: Bell Communications Research
Date: Thu, 9 Apr 92 16:40:17 GMT

Seveeral people have reported attempts to write non-tk based
send commands. What is the status of these efforts? I'm at
a point in a project where this is becoming much needed.

Ross Huitt
bytor@ctt.bellcore.com
From: root@interzone.cerf.net (Operator)
Newsgroups: comp.lang.tcl
Subject: Compiling on the NeXT
Keywords: Compiling NeXT
Date: 7 Apr 92 00:14:54 GMT
Reply-To: murshid@nic.cerf.net



Has anyone had any luck compiling tcl on the Next?

Jerry
murshid@nic.cerf.net
From: eichin@athena.mit.edu (Mark W. Eichin)
Newsgroups: comp.lang.tcl
Subject: Anyone working with BYO?
Summary: BYO is fun...
Keywords: BYO TK wish X
Date: 8 Apr 92 18:08:41 GMT
Article-I.D.: athena.1992Apr8.180841.18883
Organization: MIT SIPB

I've just started playing with BYO. It is a really impressive
application by itself, and the built in help and "mostly obvious"
interface work quite well as a substitute for other documentation.
	While it does an excellent job putting together pieces of an
interface, I'm a little confused at how to interact with the pieces it
builds. Does anyone have an example of something using a listbox and
some buttons, with glue for changing entries in the listbox using the
buttons? or perhaps a filebrowser written mostly with byo and the
bindings menus?
				_Mark_ <eichin@athena.mit.edu>
				MIT Student Information Processing Board
Newsgroups: comp.lang.tcl
From: brannon@stun4b.cs.caltech.edu (Terrence M. Brannon)
Subject: Re: tcl vs embedded perl
Organization: Caltech Yoga Qi Gong Tai Chi
Distribution: all
Date: Sat, 11 Apr 1992 16:43:20 GMT

   >Certainly PERL is more widely used, for now at least.  But some people feel, 
   >as Dale Worley (worley@compass.com) fairly eloquently said: "In my opinion, 
   >Perl's biggest weaknesses are (1) its syntax is fantastically complex
   >(consider the multiple meanings of / and $), and (2) it is a collection of 
   >features more than a coherent language for expressing algorithms."

   Good points. I've been much more productive in tcl than I was in perl.


Questions:
	I didnt see many string parsing features in the documents I
have looked over for tcl. Perhaps you dont do much string parsing?
	How about filtering input and output to an inferior proocess?

These are two features I like about Perl but Ihavent seen anymention
of such niceties in Tcl.

But the ability to do hello, world in two lines in impressive to say
the least.

--
Terrence Brannon                              brannon@jove.cs.caltech.edu 
yoga . qi gong . tai chi . shamanism . primitive knowledge . neurobiology
Happiness!   Happiness!  Happiness!   Happiness!  Happiness!   Happiness!  
po box 5027		bethlehem, pa 18015 usa              215.758.1720

Newsgroups: comp.lang.tcl
From: mgc@cray.com (M. G. Christenson)
Subject: Re: raising and lowering the application
Reply-To: mgc@cray.com
Organization: Cray Research, Inc.
Date: 8 Apr 92 10:52:22 CDT

>Is it possible for an application to raise and lower itself wish
>respect to other windows?  I can achieve this by
>'wm iconify . ; wm deiconify .' but this is both ugly and
>impractical becuase a sleep of undeterminate length must be done
>in between the two commands.

The following should do what you want.	Sorry, it's not all
a patch -- you'll have to do some hand stitching.

First, apply the patch at the end of this message to tkWindow.c.
Then, add the following to your application (e.g., main.c for wish).

int
RaiseCmd(tkwin, interp, argc, argv)
    Tk_Window tkwin;			/* Application window. */
    Tcl_Interp *interp;			/* Current interpreter. */
    int argc;				/* Number of arguments. */
    char **argv;			/* Argument strings. */
{
    Tk_Window window;
    int x, y;

    if (argc != 2) {
	Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
		" window\"", (char *) NULL);
	return TCL_ERROR;
    }
    window = Tk_NameToWindow(interp, argv[1], tkwin);
    if (window == NULL) {
	return TCL_ERROR;
    }
    Tk_RaiseWindow(window, x, y);
    return TCL_OK;
}

int
LowerCmd(tkwin, interp, argc, argv)
    Tk_Window tkwin;			/* Application window. */
    Tcl_Interp *interp;			/* Current interpreter. */
    int argc;				/* Number of arguments. */
    char **argv;			/* Argument strings. */
{
    Tk_Window window;
    int x, y;

    if (argc != 2) {
	Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
		" window\"", (char *) NULL);
	return TCL_ERROR;
    }
    window = Tk_NameToWindow(interp, argv[1], tkwin);
    if (window == NULL) {
	return TCL_ERROR;
    }
    Tk_LowerWindow(window, x, y);
    return TCL_OK;
}

and (somewhere) ...

    Tcl_CreateCommand(interp, "raise", RaiseCmd, (ClientData) w,
	    (void (*)()) NULL);
    Tcl_CreateCommand(interp, "resize", ResizeCmd, (ClientData) w,
	    (void (*)()) NULL);

and finally the patch:

*** ../tk-1.4/tkWindow.c	Tue Mar 10 12:51:36 1992
--- tkWindow.c	Fri Jan 10 16:51:42 1992
***************
*** 1098,1103 ****
--- 1099,1132 ----
      } else {
	winPtr->dirtyChanges |= CWX|CWY;
	winPtr->flags |= TK_NEED_CONFIG_NOTIFY;
+     }
+ }
+ 
+ void
+ Tk_RaiseWindow(tkwin)
+     Tk_Window tkwin;		/* Window to move. */
+ {
+     register TkWindow *winPtr = (TkWindow *) tkwin;
+ 
+     if (winPtr->window != NULL) {
+	XRaiseWindow(winPtr->display, winPtr->window);
+	if (!(winPtr->flags & TK_TOP_LEVEL)) {
+	    DoConfigureNotify(winPtr);
+	}
+     }
+ }
+ 
+ void
+ Tk_LowerWindow(tkwin)
+     Tk_Window tkwin;		/* Window to move. */
+ {
+     register TkWindow *winPtr = (TkWindow *) tkwin;
+ 
+     if (winPtr->window != NULL) {
+	XLowerWindow(winPtr->display, winPtr->window);
+	if (!(winPtr->flags & TK_TOP_LEVEL)) {
+	    DoConfigureNotify(winPtr);
+	}
      }
  }
  

Newsgroups: comp.lang.tcl
From: t4mhoff@srv.PacBell.COM (Todd Hoff)
Subject: Problems with packages
Keywords: n
Organization: Pacific * Bell
Distribution: all
Date: Wed, 8 Apr 1992 22:01:29 GMT

The packages feature doesn't appear to work, or more likely
I am not using it correctly, because packages aren't being found
and the .tindx files are not being built from the .tlib files.

Here's the configuration:

Environment:

TCLDEFAULT=/home/zeus/t4mhoff/bin/TCLDEFAULT


TCLDEFAULT contents:

# Temporary TCLDEFAULT file for debugging
set TCLPATH /home/zeus/t4mhoff/tcl/extended/tcllib
set TCLINIT /home/zeus/t4mhoff/tcl/extended/tcllib/TclInit.tcl

Contents of /home/zeus/t4mhoff/tcl/extended/tcllib:

8queens.tcl    buildhelp.tcl  esl.tlib       tcl.tlib
TclInit.tcl    buildidx.tcl   help/          tcl.tndx

The packages proc fromt tcl.tlib is not being found. Neither is the
saveScreen proc from esl.tlib.

My esl.tlib:
 
#@package: esl saveScreen

proc saveScreen fileId {
   set screen [esCutScreen]
   foreach line $screen {
      puts $fileId $line
   }

   return "0"
}


Any ideas?
-- 
Thanx
Todd
t4mhoff@srv.pacbell.com
What the thinker thinks the prover proves (someone)
From: nuruddin@nil.mni.mcgill.ca (Nuruddin Bohari)
Newsgroups: comp.lang.tcl
Subject: Re: Tutorials for Tcl/Tk ??
Date: 8 Apr 92 15:31:38 GMT
Article-I.D.: thunder.1992Apr8.153138.5918
Organization: NeuroImaging Laboratory, Montreal Neurological Institute

In article <1992Apr8.161050.1@cc.helsinki.fi>, linkosalo@cc.helsinki.fi writes:
|> 
|> 
|> Are there any tutorials for TCL/TK? What I'd like to see is a shortish paper
|> listing all commands and their use _in_nutshell_. Also some example programs
|> could be useful. Reading the man -pages is quite tedious, as they don't give
|> any overall picture of the language.
|> 
|> I'm planning to use TCL/TK within a C user-interface in a X-windows program.
|> 
|> 
|> Tapio Linkosalo,
|> univ. of Helsinki, Finland
|> 
|> internet: linkosalo@cc.helsinki.fi  OR tapio.linkosalo@helsinki.fi
 
DITTO HERE !!!
-nb
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Nuruddin Bohari				Tel	: 514-398-8330	            
NeuroImaging Laboratory			Fax	: 514-398-8948 
McGIll University,
Montreal Neurological Institute		E-mail	: nuruddin@NIL.MNI.McGill.CA 
MONTREAL, Que. , Canada.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
"Young enough to wonder
 Old enough to wander
 Fool enough to think he knows the way"   -Lilac Time
Newsgroups: comp.lang.tcl
From: nino@k.gp.cs.cmu.edu (Nino Vidovic)
Subject: tcl + spreadsheet
Reply-To: nino@k.gp.cs.cmu.edu (Nino Vidovic)
Organization: Carnegie Mellon University
Date: Mon, 13 Apr 92 23:45:56 GMT


Recently, somebody posted note on spreadsheet and tcl.
Would he please get in touch with me.

Thanks,

Nino

Newsgroups: comp.lang.tcl
From: wave@waits.media.mit.edu (Michael B. Johnson)
Subject: car and cdr in tcl?
Organization: MIT Media Laboratory
Date: Mon, 13 Apr 1992 04:40:50 GMT

Hi folks.  I'm a big tcl fan, and a much more than casual user for the last few  
years.  Most times the sort of stuff I use tcl for is quite removed from the  
functionality provided by the base commands, and most of the real "tcl  
programming" I've done has been minimal.  This is beginning to change, and I'm  
finding myself writing more and more actual "tcl code" lately.  So, with that  
as preface...

Given a string, say "set a 1", is there some tcl command (in vanilla 6.2) that  
will let me pull the first element out?  And another command that will pull out  
everything but the first element?  In other words, tcl equivalents of car and  
cdr from LISP?  I wrote these for my stuff that uses tcl, and it only took a  
few minutes, but I wanted to make sure I wasn't missing something in the base  
language...

Thanks.

--

-->  Michael B. Johnson
-->  MIT Media Lab      --  Computer Graphics & Animation Group
-->  (617) 253-0663     --  wave@media-lab.media.mit.edu
-->  NeXT Mail accepted at  wave@waits.media.mit.edu
From: linkosalo@cc.helsinki.fi
Newsgroups: comp.lang.tcl
Subject: Re: Simple example programs needed
Date: 15 Apr 92 11:15:14 GMT
Organization: University of Helsinki

In article <1992Apr13.111341.1476@cc.Helsinki.FI>, linkosalo@cc.Helsinki.FI (Tapio Linkosalo) writes:

> In tk1.4 -subdirectory there is a program called tkSquare.c. Unfortunately I've
> been unable to compile it. The linker says 'Undefined symbol: -main'. I can't 
> find any main(), guess there should be one? Or should I build another main-
> program that calls tkSquare?
> 

 'tkSquare' in _not_ a standalone program, it should be compiled with/into
 'main.c'-demo found also in tk1.4 -subdirectory.

 On the other hand, 'main.c' can be compiled alone.

 Tapio Linkosalo
 internet: tapio.linkosalo@helsinki.fi OR
           linkosal@salava.metla.fi
From: ouster@sprite.Berkeley.EDU (John Ousterhout)
Newsgroups: comp.lang.tcl
Subject: Re: binding number keys in Tk
Date: 15 Apr 92 22:24:53 GMT
Article-I.D.: agate.siaflINNsdn
Organization: U.C. Berkeley Sprite Project
NNTP-Posting-Host: tyranny.berkeley.edu

In article <1992Apr13.234146.12982@stortek.com>, v040376@autspc1.stortek.com (Jeff Hanson) writes:
|> I am trying to bind the number keys on the keyboard in an entry widget 
|> using tk1.4. But when I specify the keysym for the 1, 2, or 3 keys I get
|> an error from bind. The error is : 
|> 
|>  specified button "1" for non-button event
|> 
|> It appears that tk is assuming "1" is shorthand for button-1 as is stated 
|> in the bind man page. I verified the keysym for the number keys using 
|> xmodmap -pk and I am able to bind other keys such as the keypad number keys
|> (using KP_1 for a keysym). Here is the command I am using for the binding:
|> 
|> 	bind myentry <KeyPress-1> {%W insert cursor "%A"}
|> 
|> My questions are then am I doing something wrong, or is there a bug in the 
|> tk code with respect to this feature.

Oops.  It's a bug.  I've found and fixed it in my sources, and here's
a context diff that you should be able to apply to fix it too.  Sorry for
the error, and thanks for reporting the problem.

*** /tmp/,RCSt1215855	Wed Apr 15 15:22:45 1992
--- tkBind.c	Wed Apr 15 15:20:01 1992
***************
*** 1242,1247 ****
--- 1242,1250 ----
  		if (patPtr->eventType == -1) {
  		    patPtr->eventType = ButtonPress;
  		    eventMask |= ButtonPressMask;
+ 		} else if ((patPtr->eventType == KeyPress)
+ 			|| (patPtr->eventType == KeyRelease)) {
+ 		    goto getKeysym;
  		} else if ((patPtr->eventType != ButtonPress)
  			&& (patPtr->eventType != ButtonRelease)) {
  		    Tcl_AppendResult(interp, "specified button \"", field,
***************
*** 1258,1263 ****
--- 1261,1267 ----
  		patPtr->needMods &= masks[patPtr->detail];
  		patPtr->hateMods &= masks[patPtr->detail];
  	    } else {
+ 		getKeysym:
  		hPtr = Tcl_FindHashEntry(&keySymTable, (char *) field);
  		if (hPtr == NULL) {
  		    Tcl_AppendResult(interp, "bad event type or keysym \"",
Newsgroups: comp.lang.tcl
From: nvs@k.gp.cs.cmu.edu (Nino Vidovic)
Subject: TCL + SPREADSHEET (e-mail address correction)
Reply-To: nvs@k.gp.cs.cmu.edu (Nino Vidovic)
Organization: Carnegie Mellon University
Date: Wed, 15 Apr 92 18:54:34 GMT


Looking for posting on spreadsheet and tcl.

my correct e-mail address is:

	nvs@k.gp.cs.cmu.edu

Newsgroups: comp.lang.tcl
From: t4mhoff@srv.PacBell.COM (Todd Hoff)
Subject: Access command line arguments from within a script?
Keywords: n
Organization: Pacific * Bell
Distribution: all
Date: Thu, 9 Apr 1992 20:30:57 GMT

How do you get command line arguments from within
a tcl script? The only way I can think is to use
a c wrapper, parse the args, and use SetVar to make them
available to the script.

Could someone also please pretty please answer my question 
about my problems with packages?

I would hate to see tcl not used because those in the
know aren't willing to help newbies.

-- 
Thanx
Todd
t4mhoff@srv.pacbell.com
What the thinker thinks the prover proves (someone)
Newsgroups: comp.lang.tcl
From: mycroft@hal.gnu.ai.mit.edu (Charles Hannum)
Subject: Re: expect question: spawn $prog $args
Keywords: expect, spawn, concatenate, uplevel
Organization: MIT Laboratory for Computer Science
Date: Mon, 13 Apr 1992 04:33:24 GMT


In article <1992Apr13.022056.14629@cs.ubc.ca>, dhami@cs.ubc.ca (Mandeep
S Dhami) writes:
> 
> spawn seems to have a problem with list arguments.
> If I wish to spawn prog1 with arguments arg1 and arg2
> and  I try something like:
> 
> set prog prog1
> set args {arg1 arg 2} # this list is in general found dynamically
> spawn $prog $args
> 
> it behaves like
> % prog1 'arg1 arg2'
> and not like 
> % prog1 arg1 arg2

You clearly fail to understand how Tcl's parsing works.  Here's what
happens (sort of):

  % spawn $prog $args                     # command
  % "spawn" "$prog" "$args"               # separated into words
  % "spawn" "prog1" "arg1 arg2"           # variables substituted

IF you want it to reparse $args, try:

  % eval spawn $prog $args
From: beshers@cs.columbia.edu (Clifford Beshers)
Newsgroups: comp.lang.tcl
Subject: raising and lowering the application
Date: 7 Apr 92 23:51:15 GMT
Article-I.D.: ground.BESHERS.92Apr7185115
Distribution: comp
Organization: Columbia University Computer Science


Is it possible for an application to raise and lower itself wish
respect to other windows?  I can achieve this by
'wm iconify . ; wm deiconify .' but this is both ugly and
impractical becuase a sleep of undeterminate length must be done
in between the two commands.


--
-----------------------------------------------
Clifford Beshers
450 Computer Science Department
Columbia University
New York, NY 10027
Office:  (212) 854-8184
Fax:     (212) 666-0140
Email:   beshers@cs.columbia.edu
From: kennykb@dssv01.crd.ge.com (Kevin B. Kenny)
Newsgroups: comp.lang.tcl
Subject: Re: Non-Tk based send command
Date: 10 Apr 92 21:21:03 GMT
Reply-To: kennykb@crd.ge.com
Organization: GE R&D, Information Architectures & Management Program


In article <1992Apr9.164017.1548@porthos.cc.bellcore.com>,
bytor@ctt.bellcore.com writes:
|> Seveeral people have reported attempts to write non-tk based
|> send commands. What is the status of these efforts? I'm at
|> a point in a project where this is becoming much needed.
|> 
|> Ross Huitt
|> bytor@ctt.bellcore.com

I could put in a shameless plug for the one I've released;
it's in the file tclTCP.tar.Z on barkley.berkeley.edu.

But I won't. 8-)


73 de ke9tv/2, Kevin
Newsgroups: comp.lang.tcl
From: maule@fig25.cray.com (Mark Maule)
Subject: Re: Tcl open command
Originator: maule@fig25
Organization: Cray Research, Inc.
Date: 15 Apr 92 17:16:42 CDT


In article <ADRIANHO.92Apr15134240@barkley.berkeley.edu>, adrianho@barkley.berkeley.edu (Adrian J Ho) writes:
> In article <1992Apr15.130534.26425@hemlock.cray.com> maule@fig25.cray.com (Mark Maule) writes:
> >Why does the tcl open command (source in tclUnixAZ.c, function Tcl_OpenCmd())
> >return a TCL_ERROR code if the file cannot be opened?  I understand why you
> >would want to do that on a usage error, but why not return TCL_OK, and set
> >the interp result to something more analagous to the NULL returned by fopen()?
> >(I guess even the string NULL would work).
> 
> Do you have an example in which it would be more convenient to have
> "open" return TCL_OK?  I can't think of an example in which returning
> "NULL" as a file handle is a big win over "catch"ing the error.
> 
> From a philosopical standpoint, I think the return value *should* be
> TCL_ERROR, because "open" cannot return a *valid* file handle under
> the circumstances.  It's also, of course, a built-in defense against
> sloppy or no error handling, especially for the neophyte who's never
> heard of "catch".  8-)

Or the psuedo-neophyte who has heard of and forgotten what 'catch' does (I would
be in the latter group).

Thanks for the [mail] responses ... obviously 'catch' is the solution to my
non-problem.

Mark
From: karl@NeoSoft.com (Karl Lehenbauer)
Newsgroups: comp.lang.tcl
Subject: Re: Access command line arguments from within a script?
Date: 10 Apr 92 03:31:41 GMT
Distribution: all
Organization: NeoSoft Communications Services -- (713) 684-5900

In article <1992Apr9.203057.11699@PacBell.COM> t4mhoff@srv.PacBell.COM (Todd Hoff) writes:
>How do you get command line arguments from within
>a tcl script? The only way I can think is to use
>a c wrapper, parse the args, and use SetVar to make them
>available to the script.

If you use Extended Tcl, the argv is made into a list and setvar'ed
as a global variable, "argv".
-- 
-- Email info@NeoSoft.com for info on getting Internet access.
     "Trust me.  I know what I'm doing." -- Sledge Hammer
Newsgroups: comp.lang.tcl
From: maule@fig25.cray.com (Mark Maule)
Subject: Tcl open command
Originator: maule@fig25
Organization: Cray Research, Inc.
Date: 15 Apr 92 13:05:34 CDT


Perhaps this has been asked before, perhaps not.  (Sorry if it has)

Why does the tcl open command (source in tclUnixAZ.c, function Tcl_OpenCmd())
return a TCL_ERROR code if the file cannot be opened?  I understand why you
would want to do that on a usage error, but why not return TCL_OK, and set
the interp result to something more analagous to the NULL returned by fopen()?
(I guess even the string NULL would work).

The same question applies to tilde substitution when the given user does not
exist, as in:  file exists ~nouser/a.

Just curious ...

Mark

Newsgroups: comp.lang.tcl
From: muhr@opal.cs.tu-berlin.de (Thomas Muhr)
Subject: Re: Is this a DigiBug?
Organization: Techn. University of Berlin, Germany
Distribution: fb20
Date: Thu, 16 Apr 1992 19:26:21 GMT

Sorry, the origin of the above was not meant to be posted in this group. I
did one keystroke too much on our newsreader (nn).
Thomas
--
Thomas Muhr - Project ATLAS - Technical University of Berlin
voice: (xx49) (030) 314 27882  
INTERNET: muhrth@db0tui11.bitnet
UUCP: muhr@opal.cs.tu-berlin.de
Newsgroups: comp.lang.tcl,comp.os.vms
From: angel@flipper.rsmas.miami.edu (Angel Li)
Subject: Announcing a complete port of tcl and tk to VMS
Organization: University of Miami/RSMAS
Date: Wed, 8 Apr 92 23:24:01 GMT

I had some spare time last week and I ported tcl 6.2 and tk 1.4 to VMS.  Just
about everything works in tcl: open, exec, glob, times, etc.  For tk,
the demo script "widget" runs just fine.  Even BYO might work, I ran it
and it created its three startup windows but I am not familiar enough with
it to do anything else.

There are two files on mango.rsmas.miami.edu, directory ~ftp/pub:

	tcl-vms.bck.Z
	tk-vms.bck.Z

They were both compressed with unix compress and it's up to you to figure
out how to restore the characteristics that BACKUP likes.  Each BACKUP
saveset contains a readme.vms you should read.

Any comments and/or fixes should be mailed to me directly or posted in
comp.lang.tcl, I don't read comp.os.vms.

Please don't ask for this via e-mail, it's just too big to send that way.


-- 
Angel Li
University of Miami/RSMAS Remote Sensing Group

Internet: angel@flipper.miami.edu			UUCP: ncar!umigw!angel
"Every time you think it weakens the nation."
From: dhami@cs.ubc.ca (Mandeep S Dhami)
Newsgroups: comp.lang.tcl
Subject: expect question: spawn $prog $args
Summary: On passing list types to spawn
Keywords: expect, spawn, concatenate, uplevel
Date: 13 Apr 92 02:20:56 GMT
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada


spawn seems to have a problem with list arguments.
If I wish to spawn prog1 with arguments arg1 and arg2
and  I try something like:

set prog prog1
set args {arg1 arg 2} # this list is in general found dynamically
spawn $prog $args

it behaves like
% prog1 'arg1 arg2'
and not like 
% prog1 arg1 arg2

(so if progx=cat and arg1=file1 and arg2=file2,
you get the message like cat: 'file1 file2' not found)

the only solution I have is:

proc xxx {p arg} {uplevel spawn $p $arg}
xxx $prog $args

I am not satisfied with this and believe that there should be
a better way. Any suggestions?

Thank you,
Mandeep.

PS: I would appreciate e-mail replies.

--
--------------------------------------------------------------------------
dhami@cs.ubc.ca                                 Beautiful British Columbia
--------------------------------------------------------------------------