HDTenEightyP/NetNews huggingface dataset:
From: karl@NeoSoft.com (Karl Lehenbauer)
Subject: Re: How do I return an array as a list ?
Organization: NeoSoft Communications Services -- (713) 684-5900
Date: Mon, 4 Jan 1993 05:48:14 GMT
Keywords: array list procedure

In article <brucet.726113122@extro.ucc.su.OZ.AU> brucet@extro.ucc.su.OZ.AU (Bruce Tulloch) writes:
>proc arrayToList {array {context 1}} {
>    set names [uplevel $context array names $array]
>    if {![llength $names]} {return}
>    foreach name $names {
>        set item [echo $name [uplevel $context echo $[uplevel $context echo $array]($name)]]
>        lappend contents $item
>    }
>    return $contents
>}

Sure, use upvar.  The proc below shows how:

proc arrayToList {arrayName} {
    upvar $arrayName myArray

    set result ""
    foreach name [array names myArray] {
	lappend result "$name $myArray($name)"
    }
    return $result
}

Note that with upvar this sort of thing isn't so necessary, anyway, because
you can use upvar to pass the names of arrays to procs, where the proc
links into the actual array with upvar.
-- 
-- Email info@NeoSoft.com for info on getting interactive Internet access.
"In a minute, I'll burp up your droid."
From: Prakash.Padmanabhan@cs.cmu.edu
Newsgroups: comp.lang.tcl
Subject: Tk  canvas - help ?
Date: 7 Jan 93 07:52:09 GMT
Article-I.D.: cs.EfH6r9q00hMeACI0US
Organization: Carnegie Mellon, Pittsburgh, PA

I need some info about Tk canvas.  Can someone tell me where I can find
its documentation, location, etc.

Thanks
Prakash
From: louie@sayshell.umd.edu (Louis A. Mamakos)
Newsgroups: comp.lang.tcl
Subject: Re: TCL3.0 installation lack
Date: 4 Jan 1993 19:46:59 GMT
Organization: University of Maryland, College Park
NNTP-Posting-Host: sayshell.umd.edu

>>The bin directory is set to /usr/local .. Almost every site I'm familiar
>>with uses /usr/local/bin and the only one I know which doesn't was afflicted

>	We have our tcl stuff in /usr/var/misc/bin (also in /usr/var/misc/lib
>et al).  With our home grown stuff in /usr/var/cpu/...

How about /local/bin, /local/lib, /local/include?  Saves on the typing as
well as less cycles in namei().

I guess it really doesn't matter so long as the Makefile has a
variable which can be set.  Also, I don't believe that the Makefile
installs tclHash.h.  If you're using the various hash table functions,
you need this too.

louie
From: estephen@whosnext.cad.gatech.edu (Eric R Stephens)
Newsgroups: comp.lang.tcl
Subject: tree widget
Date: 7 Jan 1993 14:09:03 GMT
Organization: Georgia Institute of Technology, CAE/CAD Lab
NNTP-Posting-Host: whosnext.cad.gatech.edu

Was the simplist way to take a list of lists ... and draw a button  
tree where each button will bring forward a Tk window whose name is  
the same as the buttons?

Shortest Code Wins!!!
Newsgroups: comp.lang.tcl,news.answers
From: garfield@cs.tu-berlin.de (Sven Delmas)
Newsgroups: comp.lang.tcl
Subject: Re: where to ftp xf?
Date: 6 Jan 1993 10:56:06 GMT
Organization: Techn. Univ. Berlin (Germany)
Distribution: world
NNTP-Posting-Host: avalanche.cs.tu-berlin.de
In-reply-to: wongi@netcom.com's message of Wed, 6 Jan 1993 00:55:26 GMT

In article <1993Jan6.005526.21079@netcom.com> wongi@netcom.com (Isaac Wong) writes:

   the subject says it all. thanks.
barkley.berkeley.edu (tcl/code/xf1.4.tar.Z)
coma.cs.tu-berlin.de (pub/tcl/xf.tar.Z)

Please keep in mind, that xf 1.4 only works with Tk 2.3. I am working
on a new xf that supports Tk 3.0.

Sven


--
----
  Sven Delmas (Techn. Univ. Berlin)
    garfield@cs.tu-berlin.de
----
  For every problem there is a solution which is simple, clean and wrong.
                                                  Henry Louis Mencken
Newsgroups: comp.lang.tcl
From: kuku@acds.physik.rwth-aachen.de (Christoph Kukulies)
Newsgroups: comp.lang.tcl
Subject: running ./library/demos fails for tk3.0
Date: 9 Jan 1993 17:16:34 GMT
Organization: I.Physikalisches Institut RWTH-Aachen
Distribution: world
Reply-To: kuku@acds.physik.rwth-aachen.de
NNTP-Posting-Host: acds.physik.rwth-aachen.de


Excuse me if I may be missing something but I took tk3.0.tar.Z from
sprite.berkeley.edu yesterday, and cannot get the most examples
running (demos in library/demos).

I performed the following steps to install it on both, 386BSD and Dec Ultrix:

cd /u/tk3.0/tcl

/config        (nothing special for Ultrix, strtod was flagged for 386BSD)

cd ..

make
make install

For 386BSD I had to -U__STDC__ in the tcl Makefile as well as some quirks
around setenv() typing (int vs. long). Anyway, both installations went smooth.

Under Ultrix I took cc while under 386BSD gcc 2.3.3.

Now I went down into library/demos and typed 

wish <widget  

because I'm curious, what ne widget there are, e.g. if there is a file selector dialog now. Is there one ?

Yes, I know, I could also type ./widget (in case that the installation path
of wish is /usr/local - but I find this not the right place - I always put my binaries in /usr/local/bin.

Surprisingly I get a burst of errors like 

-command
-underline
-borderwidth

were not understood.

The only dropdown menus that work are the two leftmost of the widget demo.
Anyone observing this,too?

I have the same behaviour on either system (Ultrix and 386BSD).

--
--Chris
Christoph P. U. Kukulies
kuku@acds.physik.rwth-aachen.de
*** Error code 1
 
Stop.

Newsgroups: comp.lang.tcl
From: jamensky@bnr.ca (Mark Jamensky)
Subject: Re: Setting resource for widget?
Keywords:  RESOURCE, FONT, WIDGETS, TCL/TK
Reply-To: jamensky@bnr.ca (Mark Jamensky)
Organization: Bell-Northern Research Ltd.
Date: Thu, 7 Jan 1993 17:15:08 GMT

  I have an application defaults file called "Tk" in /usr/lib/X11/app-defaults.
It contains the following which sets default fonts for certain widgets:

*Text.font:             9x15
*Button.font:           9x15
*Label.font:            9x15
*Listbox.font:          9x15
*Menu.font:             9x15
*Entry.font:            9x15
*Menubutton.font:       10x20
*RadioButton.font:      9x15
*Message.font:          9x15bold

  After some investigation I also discovered which widgets need to be changed
in order to get reverse video.  They are:

*background:       black
*foreground:       white
*borderColor:      white
*cursorBackground: white
*selectBackground: white
*selectForeground: black
*selector:         white

  In my Tk initializations I do (among other things) "option readfile
/usr/lib/X11/app-defaults/Tk".

  Hope this helps.


--            | Bell-Northern Research - Ottawa | Conform or be cast out.
Mark Jamensky | jamensky@bnr.ca  (613) 765-4942 | - Rush
From: Sean.Levy@cs.cmu.edu
Newsgroups: comp.lang.tcl
Subject: Re: problems w/ bos-1.31
Date: 9 Jan 93 09:05:48 GMT
Article-I.D.: cs.MfHm8Aq00hNP9DzGpw
Organization: Carnegie Mellon, Pittsburgh, PA

Hmm... Are you sure /usr/local/lib/bos/base/load is there? This error
generally means that the loadfile cannot be found. Feel free to email me
more info if you need help.

Cheers,
			-- Sean
--
                         Sean Levy, n-dim Group
                 Engineering Design Research Center, CMU

    US Mail: 5000 Forbes Ave, Pittsburgh, PA 15213
    Email: snl+@cmu.edu  (MIME and ATK welcome)
    Phones: +1 412 268 {5217(lab),5221(ans.mach.),5229(fax)}
From: sean+@andrew.cmu.edu (Sean McLinden)
Newsgroups: comp.lang.tcl
Subject: Re: TCL3.0 installation lack
Date: 5 Jan 93 02:01:40 GMT
Article-I.D.: andrew.gfGLWYa00WBMQ161QY
	<1ia47jINNolq@ni.umd.edu>
Organization: Carnegie Mellon, Pittsburgh, PA

>How about /local/bin, /local/lib, /local/include?  Saves on the typing as
>well as less cycles in namei().
> 
>I guess it really doesn't matter so long as the Makefile has a
>variable which can be set.  Also, I don't believe that the Makefile
>installs tclHash.h.  If you're using the various hash table functions,
>you need this too.

Actually it does matter, though for obscure reasons. The problems seems
to be an inconsistent approach to developing Unix directory hierarchies
that probably goes back at least as far as BSD. Since both "/" and
"/usr" support ./bin, ./lib, ./etc, ./man and ./tmp, one might argue that
for consistency a "/usr/local" (which is really the logical root of
the tree) should support the same configuration, e.g., /usr/local/bin,
/usr/local/etc, /usr/local/lib, etc.

Why is this important, besides consistency? Because otherwise it becomes
impossible to write simple Makefile(s) which will accept only a
ProjectRoot (to use the X11R5 Imake convention) and locate things,
appropriately. This lack of standard convention for software distributions
can drive a systems person crazy. Without a standard convention, each
Makefile reflects the layout at the source institution which may or may
not look like anyone else's. Worse yet, there seems to be a general trend
toward avoiding the use of a subdirectory for #include files. If one
more person tries to have me install a /usr/include/util.h (as if no one
would *ever* think to pick that name)...

This may seem like a trivial problem (certainly given the state of things
in Somalia it is). But I suspect that hundreds of thousands of personhours
are spent each user by Unix system administrators trying to resolve differences
between file system layouts because we have no widely accepted conventions
for such. When this makes up the difference between a one hour and a one
half day install, it becomes pretty significant even on a personal level.

Sean McLinden
From: markd@NeoSoft.com (Mark Diekhans)
Subject: Proposed change to Tcl command parsing.
Organization: NeoSoft Communications Services -- (713) 684-5900
Date: Tue, 5 Jan 1993 07:53:19 GMT



    I have been taking to John Ousterhout about a possible change to the way
Tcl handled newlines in bracketed commands.  In older versions of Tcl (pre-6.0)
newlines within [] were not treated as command separators, just standard
white-spaces (as with newlines within {}).  This allowed complex multi-line
bracketed commands without the use of backslashes.

    In Tcl 6.0 John change the parsing of commands within [] so that is
consistent with parsing of commands outside of [].  Initially I thought this
consistency was a great idea, but after a lot of use, it seems to me that it
makes Tcl harder to read due to having to use even more backslashes.

   John still feels that the consistency is overriding, so we thought we would
put it out on the net for a discussion and a vote.  If there is strong
consensus one way or another, John will probably follow it.

Discussion on the net, but send your votes to:

   markd@grizzly.com

and I will post a summary and send it to John.

To summarize:

    Arguments for treating newlines as whitespace within []:

      o Makes multi-line bracket commands more readable by eliminating
        backslashes.

      o The change will break very little code, as multiple commands are almost
        never used within [].

      o Is consistent with the behavior of "" and {} (but not commands
        within {}).

    Arguments for treating newlines as command separators within []:

      o Consistent with the treatment of newlines outside of [].  Does not add
        a special quirk to Tcl, newlines always terminate commands.

      o Will break no code, as this is the way Tcl is currently behaving.

Newsgroups: comp.lang.tcl
From: weinri@athena.cs.uga.edu (Kevin Weinrich)
Subject: Wish to contact other xf users
Organization: University of Georgia, Athens
Date: Tue, 5 Jan 1993 19:59:59 GMT

I've just started using Sven Delmas' xf to create tk/tcl programs, and
I'm interested in communicating with any other xf users.

A couple of preliminary questions:
  Should I move up to tk 3.0 and tcl 6.5? (I'm using xf 1.4, and tk 2.3)

  Has anyone experienced a problem of not being able to create
   global variables or procedures through the "Programming" menu
   choice?

I'd also like to hear any stories of successes and failures you've had
with xf.

Thanks very much,
Kevin Weinrich
(preferred address: kbw@helios.ath.epa.gov)

Newsgroups: comp.lang.tcl
From: johng@cimage.com (John Gourlay)
Subject: Re: Proposed change to Tcl command parsing.
Organization: Cimage Corp, Ann Arbor, MI
X-Newsreader: Tin 1.1 PL5
Date: Tue, 5 Jan 93 13:45:40 GMT

I vote for the current behavior, consistency between [], {}, and open
code in the interpretation of newlines.

John Gourlay
From: estephen@whosnext.cad.gatech.edu (Eric R Stephens)
Newsgroups: comp.lang.tcl
Subject: canvas and  scrolling text field
Date: 11 Jan 1993 13:59:36 GMT
Organization: Georgia Institute of Technology, CAE/CAD Lab
NNTP-Posting-Host: whosnext.cad.gatech.edu
Keywords: wish, canvas, scrolling field

I'm trying to impliment a scrolling text field within a scrolling
 canvas ($c).  I'm define a frame ($c.$name_frame) with a text
($c.$name_frame.$name) and a scroll ($c.$name_frame.scroll).  I then  
create a window widget inside the canvas.  
        This all seems to work find until I enter or insert more text  
than can be shown (about 1 line more) and then tvtwm crashes.  Any  
ideas?

3.0: Does not crash but also does not respond to yview.

#Sorry about the cut up looking code.

#create a toplevel window .win
#.win contains a canvas, two scrolls, and a quit button
#.win.frame2.c contains a frame acting as a scrollable text field

#Tk2.3 would crash if too much was put into the field
#Tk3.0 scrolling does not work

    global c w
    set w .win
    catch {destroy $w}
    toplevel $w
    set entity test
    wm title $w $entity
    wm iconname $w $entity
    wm minsize $w 100 100
    set c $w.frame2.c

    frame $w.frame1 -relief raised -bd 2
    frame $w.frame2 -relief raised -bd 2
    button $w.ok -text "Quit" -command "destroy $w; destroy ."
    pack append $w $w.frame1 {top fill} $w.frame2 {top fill expand} \
            $w.ok {bottom pady 10 frame center}
	
    canvas $c -scrollregion {0c 0c 20c 50c} -width 10c -height 5c
    scrollbar $w.frame2.vscroll  -relief sunken -command "$c yview"
    scrollbar $w.frame2.hscroll -orient horiz -relief sunken \
	-command "$c xview"
    pack append $w.frame2 $w.frame2.hscroll {bottom fillx} \
            $w.frame2.vscroll {right filly} $c {expand fill}
    $c config -xscroll "$w.frame2.hscroll set" \
	-yscroll "$w.frame2.vscroll set"

	set attr list
	set ypos .5c
	set ext "_frame"
	set frameName $c.$attr$ext
	frame $frameName
	set cmd [concat $frameName.$attr {yview}]
	set ext "_scroll"
	set scrollName $frameName.$attr$ext
	scrollbar $scrollName -command $cmd -orient vert

	set cmd [concat $scrollName {set}]
	text $frameName.$attr -yscroll $cmd -relief sunken \
	  -width 18 -height 3 -foreground black -background white

	pack append $frameName $scrollName {right filly} \
		$frameName.$attr {left expand fill}
	$c create window 4c $ypos -window $frameName \
		 -anchor nw -tags item

Newsgroups: comp.lang.tcl,bnr.lang.tcl
From: norm@bnr.ca (Norm MacNeil)
Subject: psroff for man page printing - where?
Reply-To: norm@bnr.ca
Organization: Bell-Northern Research Ltd.
Date: Tue, 12 Jan 1993 16:10:41 GMT

I'm on a HP 9000/345, HP-UX 8.0.x and have no idea if/when/where psroff is.
Is this available from an FTP site?  Is it "proprietary" or something bizarre?

Thanks,
  Norm.

+-----------------------------------------------------------------------+
 Norm MacNeil                     Phone: (613) 763-3372
 Data Systems                     Fax:   (613) 765-2854
 Bell-Northern Research Ltd.      EMail: norm@bnr.ca (INTERNET)
 #include <disclaimer.std>       "Roller bladers do it in-line!"
Newsgroups: comp.lang.tcl
From: shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall)
Subject: tk3.1 ?
Date: Tue, 05 Jan 1993 14:16:25 GMT
Reply-To: jay@vnet.ibm.com
Disclaimer: This posting represents the poster's views, not necessarily those of IBM
Organization: IBM Rochester, MN

Will a tk3.1 be released soon?  There were a lot of patches flying around
right after 3.0 and I'm not sure I got them all...

-- 
: 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,bnr.lang.tcl
From: norm@bnr.ca (Norm MacNeil)
Subject: Dual box scrolling
Reply-To: norm@bnr.ca
Organization: Bell-Northern Research Ltd.
Date: Mon, 11 Jan 1993 19:24:03 GMT

I remember someone posting about how to allow for dual-box scrolling; e.g.,
with spreadsheets, you can "lock" a row or column to remain in place while
you scroll around.  I did the same for a scrolling "header" basically by

---
frame .frame
scrollbar .frame.listbox.ysb -command ".frame.listbox.box yview"
scrollbar .frame.listbox.xsb -orient horizontal -command "dualajust"
listbox .frame.listbox.hdr -geometry 40x2 -xscrollcommand \
  ".frame.listbox.xsb set"
listbox .frame.listbox.box -yscrollcommand ".frame.listbox.ysb set" \
  -xscrollcommand ".frame.listbox.xsb set"
pack append .frame \
  .frame.listbox.xsb {bottom fillx} \
  .frame.listbox.ysb {left filly} \
  .frame.listbox.hdr {expand fill} \
  .frame.listbox.box {expand fill}

proc dualajust {n} {
  global .frame.listbox.hdr .frame.listbox.box
  .frame.listbox.hdr xview $n
  .frame.listbox.box xview $n
}

---

The only problem I have is that I have to have this extra procedure to scroll
both areas.  Is there a "variable" like in bind to substitute in the value that
is passed to "dualadjust"; e.g.,

  scrollbar .frame.listbox.xsb -orient horizontal \
    -command ".frame.listbox.hdr xview %x; .frame.listbox.box xview %x"

or some such beast.

Any thoughts?

Thanks,
  Norm.

+-----------------------------------------------------------------------+
 Norm MacNeil                     Phone: (613) 763-3372
 Data Systems                     Fax:   (613) 765-2854
 Bell-Northern Research Ltd.      EMail: norm@bnr.ca (INTERNET)
 #include <disclaimer.std>       "Roller bladers do it in-line!"
From: welch@parc.xerox.com (Brent Welch)
Newsgroups: comp.lang.tcl
Subject: Re: Emacs Re: TCL as widget server
Date: 11 Jan 93 17:30:53 GMT
Distribution: comp
Organization: Xerox PARC

thayer@cs.columbia.edu (Charles Thayer) writes:

>/charles 
>PS.  There is something called siod (an embedded scheme/lisp based on
>some of the same design goals as TCL).  It would be interesting to
>throw together a emacs-a-like using mxedit.
>-- 

This is probably quite doable, and I'd be interested in the results.
mxedit uses the editing engine of the original mx written by John Ousterhout.
That engine was mostly accessible via TCL already, so my work for mxedit
wasn't too hard.  Now things are pretty well split between the engine (widget)
and the TCL that composes the application.  I'd be interested in what
its like to embed the engine into the context of another interpreter.
----------------------------------
	Brent Welch	Xerox-PARC

--

----------------------------------
	Brent Welch	Xerox-PARC
From: blk@mitre.org (Brian L. Kahn)
Subject: TCL as widget server
Organization: The MITRE Corp. Bedford, MA
Distribution: comp
Date: Fri, 8 Jan 1993 21:20:50 GMT


I would like to use TCL to add scrollbars to emacs.  I don't want to
modify emacs itself (for other reasons), so I thought I could use a
wish shell and communicate via pipes.  Unfortunately, my initial
investigation into wish have turned up dry on 'reparenting', which I
think is vital to my scheme.  Is there some way to get wish widgets to
adopt existing windows, and manage them as children?  I know X
supports this, and that I could compile TCL into a program of my own
that just does reparenting in C and makes the function a TCL program
and handles pipes nicely - but isn't there an easier way?


--
B<   Brian Kahn   blk@mitre.org   "may the farce be with you"
From: ouster@sprite.Berkeley.EDU (John Ousterhout)
Newsgroups: comp.lang.tcl
Subject: BOF suggestions solicited
Date: 6 Jan 1993 21:02:10 GMT
Organization: U.C. Berkeley Sprite Project
Distribution: world
NNTP-Posting-Host: tyranny.berkeley.edu


I'm going to be running Tcl/Tk Birds-Of-a-Feather sessions at both
the X Conference and USENIX, and I'd appreciate any suggestions
you might have about what topics to cover.  My plan right now is
to give a short introduction (possibly with some history and
future plans) and then throw the floor open for discussion.  If
there are particular things you'd like to hear about, or particularly
good topics for discussion, please send me your ideas.
From: rodgers@maxwell.mmwb.ucsf.edu (R. P. C. Rodgers, M.D.)
Newsgroups: comp.lang.tcl
Subject: installation glitches
Summary: minor installation glitches on Sun under OS 4.X
Keywords: tk newbie
Date: 7 Jan 93 17:08:21 GMT
Organization: UCSF Computer Graphics Lab

The installation of tcl/tk is as marvelously well worked out as is the
code itself, but as a newcomer, I encountered two puzzling minor annoyances
which I thought worth sharing:

1) The "make install" process died on a Sun running OS 4.1.X due to the
   presence of calls to "cp -f" in the Makefiles for both tcl and tk,
   due to the lack of a "-f" option to cp in this version of UNIX.
   I had to manually edit these out.

2) In section 7 of the top-level README in the tk directory, reference is made
   to a subdirectory "scripts/demos" which does not exist in the fresh copy
   of the tk distribution which I just obtained from sprite.berkeley.edu.
   Something like this would really be helpful.  Is it hiding elsewhere?

Cheerio, Rick Rodgers
--
R. P. C. Rodgers, M.D.         (415)476-8910
UCSF Laurel Heights Campus     UUCP: ...ucbvax.berkeley.edu!cca.ucsf.edu!rodgers3333 California St., Suite 102 Internet: rodgers@maxwell.mmwb.ucsf.edu
San Francisco CA 94118 USA     BITNET: rodgers@ucsfcca
Newsgroups: comp.lang.tcl
From: schwartz@roke.cs.psu.edu (Scott Schwartz)
Subject: Re: changing cursors
Date: Mon, 4 Jan 1993 17:37:49 GMT

Chris <chare@choreo.ca> writes:
   I want to be able to change cursors from the pointer to an
   hourglass when I am off doing some processing in the app. 

# wait
.frame config -cursor watch
# done
.frame config -cursor arrow

For more info, see the Tk_GetCursor manpage.
From: estephen@whosnext.cad.gatech.edu (Eric R Stephens)
Newsgroups: comp.lang.tcl
Subject: Pish3D or other 3D graphics capability
Date: 5 Jan 1993 17:34:28 GMT
Organization: Georgia Institute of Technology, CAE/CAD Lab
NNTP-Posting-Host: whosnext.cad.gatech.edu
Keywords: 3D

What is the best way to manipulate 3D data or wireframes in Tk?