HDTenEightyP/NetNews huggingface dataset:
From: lwv26@cas.org (Larry W. Virden)
Subject: Re: Planning for Tcl 7.0
Followup-To: comp.lang.tcl
Reply-To: lvirden@cas.org (Larry W. Virden)
Organization: Nedriv Software and Shoe Shiners, Uninc.
Date: Fri, 9 Oct 1992 01:10:43 GMT

I agree that no checking should be done with the {} - you might as well not
have them at all if you are going to check.  The {} make it possible to
generate file names which appear on other machines, in other directories, 
word lists, etc. and are the only such facilty to do this as easily.  Note
that ksh can be configured to support {} in the same manner as csh - as soon
as ksh supported it, I turned it on!  It was about the only thing from
csh that I longed for (other than a DECENT command line editing facilty...
sigh).
-- 
Larry W. Virden                 UUCP: osu-cis!chemabs!lvirden
Same Mbox: BITNET: lvirden@cas  INET: lvirden@cas.org
Personal: 674 Falls Place,   Reynoldsburg, OH 43068-1614
America Online: lvirden@aol.com
Newsgroups: comp.lang.tcl
From: jamensky@bnr.ca (Mark Jamensky)
Subject: X Protocol error in selection get
Reply-To: jamensky@bnr.ca (Mark Jamensky)
Organization: Bell-Northern Research Ltd.
Date: Fri, 16 Oct 1992 13:37:28 GMT

  I have two separate scripts written in Tk that are using the same wish
shell.  When I select some text in an xterm and do a "selection get" in the
one application, it works fine.  When I do it for the other one, I get the
following X protocol error:

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  24 (X_ConvertSelection)
  Resource id in failed request:  0x0
  Serial number of failed request:  540
  Current serial number in output stream:  540

  If I select some text in this application and then try and get the
selection, it works fine.  Only when the selection is somewhere else do I get
the error.  In the first application, it does not matter where I select the
text, it always works.

  Has anyone else seen this?  
 
-- 
Mark Jamensky  jamensky@bnr.ca  Bell-Northern Research  Ottawa  (613) 765-4942
From: blevy@syl.dl.nec.com (Britt Levy (ESD))
Newsgroups: comp.lang.tcl
Subject: wish error: invalid command name "tk_bindForTraversal"
Date: 16 Oct 92 15:51:54 GMT
Organization: NEC Systems Lab., C&C Software Technology Center (Dallas, TX)


-- 
I am new to tcl and this news group so I apologize if this 
is a FAQ. I just built tk2.3 and tcl 6.4 on an SCO platform. 
The test suite for tcl passed but when I run wish with no 
arguments I get the following error:

..local/tk2.3> /usr/local/wish
invalid command name "tk_bindForTraversal"
    while executing
"error "invalid command name \"$name\"""
    (procedure "unknown" line 38)
    invoked from within
"tk_bindForTraversal Entry"
    (file "/usr3/local/lib/tk/tk.tcl" line 81)
    invoked from within
"source $tk_library/tk.tcl"
    (file "/usr3/local/lib/tk/wish.tcl" line 21)
    invoked from within
"source $tk_library/wish.tcl"

Any help would be greatly appreciated. 

Thanks.

------------------------------------------------------------------
Britt Levy, NEC AMERICA INC             1525 W WALNUT HILL LN
blevy@esd.dl.nec.com		        IRVING TX 75038-3793
					Phone: (214) 518-3829
------------------------------------------------------------------
Newsgroups: comp.lang.tcl
From: axel@cs.tu-berlin.de (Axel Mahler)
Subject: Re: Planning for Tcl 7.0
Organization: /home/stone/axel/.organization
Date: Sun, 11 Oct 1992 18:13:40 GMT

In article <1992Oct9.231324.7005@twg.com> "David Herron" <david@twg.com> writes:
   ...
   It would be nice if key'd lists were to be folded into Official TCL
   so that we don't have to pull in the rest of the NeoSoft stuff ...

Yes! Please include keyed lists into official TCL. It would be nice if
the access syntax to keyed lists could be more tcl-ish resp. have the
look and feel of access to structured data in most other programming
languages (e.g. something like "$foo.bar.fumble" instead of "[keylget
foo bar.fumble]").

I'd also like to see explicit access to filehandlers in official TCL.
An adoption of tclRawTcp would do it.

Some sort of module concept with naming scopes is also important.

Cheers, Axel.
--
===============================================================================
Axel Mahler, Tech.Univ. Berlin
E-Mail: axel@cs.tu-berlin.de (axel@db0tui62.bitnet)
Voice: +49-30-314-73487
Newsgroups: comp.lang.tcl
From: "David Herron" <david@twg.com>
Subject: Re: Planning for Tcl 7.0
Sensitivity: Personal
Encoding:  64 TEXT , 4 TEXT 
Conversion: Prohibited
Organization: The Wollongong Group, Inc., Palo Alto, CA
Conversion-With-Loss: Prohibited
Date: Fri, 9 Oct 1992 23:16:33 GMT

> If there are other changes that you think are
> important but aren't contained on this list, let me know and I may add
> them.

The set of operations you can perform on lists seem incomplete.  I'm
not a LISPer so don't live/breath/eat lists for breakfast &c but something
I wanted to do in an application was

	I had two lists (a and b)

	I wanted to insert the elements from `b' into the middle of the
	elements of `a' at the same `level' of the list.  That is, the
	list would become

		a.1 a.2 a.3 b.1 b.2 b.3 a.4 a.5 ... a.n
	not	a.1 a.2 a.3 {b.1 b.2 b.3} a.4 a.5 ... a.n

What I ended up doing was something along the lines of

	split a into two lists c and d
	set a ""
	foreach element $c { lappend a $element }
	foreach element $b { lappend a $element }
	foreach element $d { lappend a $element }

which is going to take lots of extra CPU time if only because you're
constantly going in & out of Tcl_Eval().



It would be nice if key'd lists were to be folded into Official TCL
so that we don't have to pull in the rest of the NeoSoft stuff ...
Adding trancendtal functions to Official TCL is good in the same way.



Work on restructuring TCL so that there's a core set of functionality
which works EVERYWHERE.  That is, all the stuff which only operates
within the current memory image.  Other oddities and little used functions
like file I/O can/should be moved off to seperate modules.

Maybe I'm in a unique position, but I'm doing development work on a couple
projects where

	the software is (to be) portable amongst Unix/DOS(ick)/MacIntosh

	A user writing scripts isn't likely to need file I/O commands
	as the extensions I'm building in provide them with "all the I/O"
	they'll need ;-).

My guess is that the difficulty with the Mac/DOS(ick) ports of TCL
is these extra functions (file I/O, processes, pipes, &c).




In the C library there should be an easy equivalent to `lappend'.  Or
maybe I missed something while reading the manual.  What I was wanting
to do is create a two-level-deep TCL list which got passed back as the result.
You could do an "lappend-like" operation on the result or on a
variable, but not on an arbitrary string.  So I wrote one using the
primitives on the Tcl_SplitList()/Tcl_Merge() man page.  It wasn't
big or hard to do fortunately ...


<- David Herron <david@twg.com> (work) <david@davids.mmdf.com> (home)
<-
<- During the '80s Usenet's mantra was: "Not all the world's a VAX".
<- During the '90s I hope it becomes:   "Not all the world's DOS (ick)".
Newsgroups: comp.lang.tcl
From: Nathaniel Borenstein <nsb@thumper.bellcore.com>
Subject: Window size without update?
Organization: Bellcore
Date: Mon, 12 Oct 92 20:38:57 GMT

Is there any way to tell, for an arbitrary TK window, how big it will be
BEFORE you map it?  In particular, "winfo height" or "winfo width" don't
supply meaningful data before you give an "update" command, but it is
sometimes very desirable to find this information out before actually
doing the mapping... 


Newsgroups: comp.lang.tcl
From: reid@ccu.umanitoba.ca (Bill Reid)
Subject: Question about using "selection handle ..."
Organization: University of Manitoba, Winnipeg, Canada
Date: Wed, 7 Oct 1992 04:58:01 GMT

I would like to have a tk program pass a string to xterm via the primary
selection. How does the tk program get ownership of the primary selection?
I looked around and could not find any examples of this. R there any?


__________________________________________________________________

Bill Reid, Manager of Networking            Computer Services
Phone: (204) 474-9727                       University of Manitoba
  Fax: (204) 275-5420                       Winnipeg, MB 
Email: reid@ccu.Umanitoba.CA                Canada    R3T 2N2
From: larry@cs.berkeley.edu (Larry Rowe)
Newsgroups: comp.lang.tcl
Subject: Another usage of Tcl/Tk in a commercial product....
Date: 12 Oct 1992 18:13:52 GMT
Organization: U.C. Berkeley EECS Dept.
Distribution: world
Reply-To: larry@cs.Berkeley.EDU
NNTP-Posting-Host: tweety.cs.berkeley.edu

Here is another example of commercial use of Tcl/Tk.  Please send your
submissions to me and I'll compile them into a reasonable format.  I'm
collecting these into an FAQ that can be ftp'd from Barkley and included
in the Tcl/Tk FAQ.
	Larry
-------------------------------
Usage: CASE Tool Code Generation
Company: Westmount Technology BV, Holland
Contact: Eko Bousema
Email: ekbo@wmt.nl
US Subsidary: Westmount Inc, Boulder, CO 80302
Telephone: +1-303-4439733
Fax: +1-303-4439835

Products:
ISEE is an Open Integrated CASE tool for RDBMS and 4GL developers.
It supports Yourdon SA/SD including Dataflow Diagrams, Entity Relationship
Diagrams and Structure Charts. Full code generation for database and
3GL and 4GL applications is provided. Supported 4GL's include Ingres,
Informix and ACCELL/SQL.

TSEE  is a Open Integrated CASE tool for developers of technical systems.
It supports Yourdon SA/SD including Dataflow Diagrams, Entity Relationship
Diagrams and Structure Charts.  Code can be generated for C and C with
embedded SQL applications.


TCL/Tk:
The code generation is based on parsing diagrams and generating code
from that. This conversion is written in C++, the generation in Tcl.
The advantage of that is that user can adapt the codegeneration themself,
which is even more interesting because they can also extend the
diagram definitions.

We have extended Tcl with some features which converts diagrams
from the repository into an internal datastructure (model) which
can be accessed from within Tcl.
dov
Newsgroups: comp.lang.tcl
Subject: 'regsub' syntax [repost]
From: dov@menora.weizmann.ac.il (Dov Grobgeld)
Date: Thu, 8 Oct 1992 08:00:15 GMT
Organization: Weizmann Institute of Science, Computation Center.

[Please ignore this repost if you saw the original. I'm not sure my
first posting made it through.]

I'm having troubles understanding regsub. Here is a piece of tcl
code in which I try to use it:

    proc smartCloseBrace {w} {
        textDisplayCaret $w false;
        set ip [textGetInsertionPoint $w];
        set l [getCurrentLine $w];

        if [[regsub "    \$" $l {} l] != 0] {
            setCurrentLine $w $l\};
            setInsertionPoint $w [expr $ip - 3];
        }
        { callActionProc $w insert-string "\}"; }
        textDisplayCaret $w true;
    }

Whenever I try to invoke this procedure I get the error message:

    Wafe(execActionProc): invalid command name: "1"

What am I doing wrong? I think I have exhausted all possibilities
of "expr", "eval" and braces...

In Perl what I want to do would look something like

       if ($l=~ s/    $//) {
           &setCurrentLine($l);
           &setInsertionPoint($w, $ip-3);
       }
       else {
           &callActionProc($w, 'insert-string "\}');
       }

Any help is appreciated.

--
                                                        ___   ___
                                                      /  o  \   o \
Dov Grobgeld                                         ( o  o  ) o   |
The Weizmann Institute of Science, Israel             \  o  /o  o /
"Where the tree of wisdom carries oranges"              | |   | |
                                                       _| |_ _| |_

Newsgroups: comp.lang.tcl
From: shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall)
Subject: Re: 'regsub' syntax [repost]
Date: Thu, 08 Oct 1992 13:44:56 GMT
Reply-To: jay@vnet.ibm.com
Disclaimer: This posting represents the poster's views, not necessarily those of IBM
Organization: IBM Rochester, MN

In article <1992Oct8.080015.7105@wisipc.weizmann.ac.il>, dov@menora.weizmann.ac.il (Dov Grobgeld) writes:
|> I'm having troubles understanding regsub. Here is a piece of tcl
|> code in which I try to use it:
|> 
|>     proc smartCloseBrace {w} {
|>         textDisplayCaret $w false;
|>         set ip [textGetInsertionPoint $w];
|>         set l [getCurrentLine $w];
|> 
|>         if [[regsub "    \$" $l {} l] != 0] {
|> 
|>     Wafe(execActionProc): invalid command name: "1"
|> 
|> What am I doing wrong?

try
          if { [regsub "    \$" $l {} l] != 0 } {

The regsub command is being done, then the comparison against 0.  This
comparison gives a `1', which tcl then tries to run as a command, ie.,

   [[regsub "    \$" $l {} l] != 0]
    [ regsub "    \$" $l {} l ]
	    regsub_result
	[ regsub_result != 0 ]
	    1
	[ 1 ] means do the command named `1'.

-- 
: jay          jay@vnet.ibm.com    My opinions and ideas, not my employer's.
: shmdgljd@rchland.vnet.ibm.com    (c) Copyright 1992.  All rights reserved.
Newsgroups: comp.lang.tcl
From: karl@NeoSoft.com (Karl Lehenbauer)
Subject: Re: Planning for Tcl 7.0
Organization: NeoSoft Communications Services -- (713) 684-5900
Date: Fri, 09 Oct 1992 05:13:54 GMT

In article <1avu22INN5ao@agate.berkeley.edu> ouster@sprite.Berkeley.EDU (John Ousterhout) writes:
>7. Change "gets" so it returns 1 for success and 0 for failure.  At present
>it returns the line length for success and -1 for failure.
>Rationale: this would allow slightly simple Tcl scripts:  you could just
>say
>    while [gets $f line] {...}
>instead of
>    while {[gets $f line] >= 0} {...}
>I'm not really convinced that this one is important enough to justify the
>incompatibility, so it won't take much negative feedback to kill it.

This is how Extended Tcl 4.0 worked, and while I think it is a little
better, doing it now will break every script that does 'while {[gets...'

Also I should point out that
>    while [gets $f line] {...}

won't work.  The "gets" will be evaluated before the while, resulting in
an infinite loop and no more file reading, so it cannot be simplified beyond
    while {[gets $f line]} {...}

A lot of users will make that mistake and be pretty confused by it until
they really understand the parsing rules.

-- 
-- Email info@NeoSoft.com for info on getting interactive Internet access.
You will now awaken feeling relaxed and refreshed, remembering everything 
you've read except the details of the Omega contingency plan.
Newsgroups: comp.lang.tcl
From: mathew@elroy.Jpl.Nasa.Gov (Mathew Yeates)
Subject: more info on regexp question
Organization: Image Analysis Systems Group, JPL
Date: Wed, 14 Oct 1992 19:23:35 GMT

here is a simple expect script which does not work. Suppose catprompt
is the program

echo -n "$ "
sleep 100

the following script

#!/usr/local/expect --

debug -f log 1
set timeout 120
spawn  catprompt
expect -re "(\$ ) " {send_user "got it\n"}
exit

gives as output

using pty /dev/ttyp9
spawn dummy 
spawn: returns {14546}
expect: does {} (spawn_id 6) match pattern {($ ) }? no
$ expect: does {$ } (spawn_id 6) match pattern {($ ) }? no


Any ideas?

Mathew Yeates
		
Newsgroups: comp.lang.tcl
From: mdm@stegosaur.cis.ohio-state.edu (Michael Moore)
Subject: Re: Help with strings
Organization: The Ohio State University Dept. of Computer and Info. Science
Date: Wed, 14 Oct 1992 19:08:27 GMT

	Forgive me, the problem has been resolved.  It was a
bug in the filehandler code which I had gotten off of this group. :-)
That should teach me to do my own dirty work, eh?


	-Michael
-- 
|Michael Delbert Moore |  Home : (614) 471-1937  Office : (614) 292-7161  |
|OSU Student Programmer|--------------------------------------------------|
|Ohio State CIS Major  |     Calories consumed for a 150 pound person     |
|mdm@cis.ohio-state.edu|            Running (10 mph) : 900/hour           |
Newsgroups: comp.lang.tcl
From: boyes@bnr.ca (Greg Boyes)
Subject: Re: Is the comment illegal or the Tcl bug?
Organization: BNR Europe Ltd, Maidenhead, UK
X-Newsreader: TIN [version 1.1 PL6]
Date: Fri, 16 Oct 1992 09:56:52 GMT

Tcl_AssembleCmd() could help in applications, that are command line driven,
by stripping  out in-line  comments,  handling  line  continuation,  etc
before Tcl_Eval() gets hold of it.  Then, Tcl_Eval() is only handling a
command.  

That's ok for reading interactive input, but if Tcl_Eval() could do it, 
then it would fit better in Tcl_EvalFile().

We had to strip out comments, before Tcl_AssembleCmd(), when reading 
interactive input, and re-do Tcl_EvalFile().

Line continuation could also be introduced by "\c". (Like with some "echo"s).

See my request for in-line comments in thread "Planning for Tcl 7.0".
Newsgroups: comp.lang.tcl
From: mathew@elroy.Jpl.Nasa.Gov (Mathew Yeates)
Subject: regexp question
Organization: Image Analysis Systems Group, JPL
Date: Fri, 9 Oct 1992 19:19:36 GMT

The thing I find most difficult about writing "expect" scripts is
figuring out regular expressions. Im trying to interact with a system
which has the prompt "$". 

expect -re "(.*\$) " {}
and
expect -re "(.*\$) $" {}

and neither worked. The debugging output showed

does {some very long output.....\r\n\r$ } match pattern {(.*$) }? no

in both cases. Whats wrong?

Mathew Yeates
From: ouster@sprite.Berkeley.EDU (John Ousterhout)
Newsgroups: comp.lang.tcl
Subject: Re: Window size without update?
Date: 13 Oct 1992 00:09:10 GMT
Organization: U.C. Berkeley Sprite Project
Distribution: world
NNTP-Posting-Host: tyranny.berkeley.edu

In article <1992Oct12.203857.5525@walter.bellcore.com>, Nathaniel Borenstein <nsb@thumper.bellcore.com> writes:
|> Is there any way to tell, for an arbitrary TK window, how big it will be
|> BEFORE you map it?  In particular, "winfo height" or "winfo width" don't
|> supply meaningful data before you give an "update" command, but it is
|> sometimes very desirable to find this information out before actually
|> doing the mapping... 
|> 
|> 

I haven't actually tried this, but I think it might work, and it's the
only thing I can think of that might work:

1. Withdraw the top-level window ("wm withdraw .foo").
2. Create all the children, manage them, etc.
3. Invoke "update" so that the geometry managers can all do their things.
   Since the window is withdrawn it won't actually appear on the screen.
4. Use "winfo reqheight .foo" and "winfo reqwidth .foo" to retrieve the
   sizes requested by the geometry manager for the top-level window.
5. When you really want the window to appear, invoke "wm deiconify .foo".

Let me know if this hare-brained scheme actually works.
Newsgroups: comp.lang.tcl
From: paulf@ldgo.columbia.edu (paul friberg)
Subject: X Error with tk??
Organization: Lamont-Doherty Geological Observatory
Date: Fri, 16 Oct 1992 17:24:42 GMT

I've only just started using tcl(6.4)/tk(2.3) on a Sun Sparcstation
running SunOS 4.1.1 and have been noticing a particularly persistent
X error. When I run the wisql code (wishx) of Tom Poindexter under Sun's 
Open Windows (v2 & v3) I get the same random error. By just 
making a selection with the cursor of a button or a listbox, the
whole application fails with the following error:

X Error: BadAccess
Request Major code 88 ()
Request Minor code 173
blah blah blah...

This error happens randomly and not always on the same button or list box
item. I've encountered this same error with the widget demo provided
with the tk2.3 distribution.

Has anyone else noticed this error under Open Windows? Under any other
window manager? If so, any ideas as to what the problem is and what a 
potential fix might be. This seems like a major problem to me and is 
curtailing a strong desire of mine to learn tcl/tk.

Thanks in advance for any light that you might shed on this...

Sincerely,

Paul Friberg
Lamont-Doherty Geological Observatory of Columbia University
From: ellson@ontap.att.com (54312 - John C Ellson)
Newsgroups: comp.lang.tcl
Subject: Resizing text widgets - bug
Date: 15 Oct 92 04:08:20 GMT
Article-I.D.: cbnewsk.1992Oct15.040820.28912
Reply-To: ellson@hotsand.att.com
Organization: AT&T
Originator: ellson@ontap

I think this is a bug, but perhaps it has already been reported?

Sometimes, if I resize my application to "Full Size"
either from the menu or by double clicking on the title bar, the window
enlarges to the full size of the virtual desktop instead of the 
physical screen.

This happens under OpenWindows 3 with olvwm.

The following fragment exhibits this behaviour:

	#!/usr/local/bin/wish -f
	text .t -setgrid true

Somehow the setgrid option is necessary to make it happen in this
fragment, but I do not use setgrid in my application so the bug can
show up for other reasons.

I do not get the same behavior from either the listbox or the canvas
widgets.

John.Ellson@att.com
Newsgroups: comp.lang.tcl
From: "David Herron" <david@twg.com>
Subject: Re: Several questions about Tcl/Tk
Sensitivity: Personal
Encoding:  26 TEXT , 4 TEXT 
Conversion: Prohibited
Organization: The Wollongong Group, Inc., Palo Alto, CA
Conversion-With-Loss: Prohibited
Date: Wed, 7 Oct 1992 17:44:18 GMT

> 3.  I'm working on an "intelligent mail" ("Imail") application
> where I want to embed source code (in some language) within
> pieces of mail which will then be interpreted by the reader.
> I'd like to use tcl for this.  Does anybody have any thoughts on
> this or pointers to similar approaches taken with other platforms,
> mail readers, or interpreted languages?   Some aspects of the WWW 
> (World Wide Web) approach might be useful.

This is something to be very careful of because of the obvious trojan 
horse problem.  The language used for this case should not provide access
to external files/processes and various other things which I have not 
studied on yet (to a great extent).

Note that Nathaniel Borenstein (sp?) (currently of Bellcore) has written and
patented (?) a language which is useful for exactly this purpose.

Speculation: A good way to start is with the existing TCL 6.4 and strip 
out all its File & Process operators.  Then figure out what things you
need for screen display and pull in no more than those from `tk'.

IMHO, the first part should be done anyway as an aid to creating a portable 
core to TCL.  Extensions (like the NeoSoft things, or the file/process 
operators, or even `tk') can be loaded in with dynamically loaded library 
facilities which are in most operating systems nowadays.  And applications 
like the ones I'm working on do not need to have their potential portability 
hurt because TCL has more features than are necessary for their needs.

<- David Herron <david@twg.com> (work) <david@davids.mmdf.com> (home)
<-
<- During the '80s Usenet's mantra was: "Not all the world's a VAX".
<- During the '90s I hope it becomes:   "Not all the world's DOS (ick)".
From: jew@rt.sunquest.com (/87336)
Newsgroups: comp.lang.tcl
Subject: AIX clean tcl 6.4 compile, how I did it.
Date: 14 Oct 92 16:57:17 GMT
Distribution: na
Organization: Sunquest Information Systems

Do NOT run ./config.

Change the CC value to bsdcc and "make".  If you haven't defined
bsdcc, please consult your manual.
--
jew@sunquest.com

Every purchase has its price.
Newsgroups: comp.lang.tcl