HDTenEightyP/NetNews huggingface dataset:
From: de@helios.UCSC.EDU (De Clarke)
Newsgroups: comp.lang.tcl
Subject: Tk/Wish beginner seeks advice on use of text widget
Date: 12 Jan 1993 02:32:38 GMT
Organization: UCO/Lick Observatory
NNTP-Posting-Host: helios.ucsc.edu
Summary: variable scoping in wish scripts seems weird?


I can't figure out why the tcl executed with the -command flag from
a wish script will recognize some variables but not others.
For example, when the "load" button is pressed (see below), although
text has been entered in the text widget $w.bot.raval, I get a tcl
error no such variable.

sample code --------------
    .....

    text $w.bot.raval -width 8 -height 1 -relief raised -border 1

    pack append $w.bot $w.bot.raval {left}

    button $w.bot.load -text "load" -command \
        "set entry [${w.bot.raval} get 1.0 end]"

    .....
---------------------------

Before I put the curlies around $w.bot.raval, tcl complained
about "w" being undefined -- couldn't handle the dots in the var name.
Tcl appears to be allergic to variable names containing "." whereas
wish uses them routinely.  [?]

or take this example:

button $w.bot.dismiss -text "go away" -command \
	"puts stdout $var1; puts stdout $var2; destroy $w"

In this instance, var1 and var2 were correctly written to stdout,
but window $w was not destroyed ("No such variable $w") -- however,
when I split it into two buttons:

button $w.bot.show -text "show" -command "puts stdout $var1; puts stdout $var2"
button $w.bot.dismiss -text "go away" -command "destroy $w"

then both buttons worked!  So what is so different about three commands
separated by semicolons vs one command on its own?

Does anyone have a good theory about this?  I'm perplexed.

Or, alternatively, what is the best way in wish to prompt the user for a 
very short text entry (like an integer format i3 or whatever)...?
And how can I get their input into a tcl variable without needing
another button-push to do so?  I can't find any example of this
in the widget demos, though they cover almost everything else I
would ever want to do.

email please, I doubt that the whole world is fascinated by my
dumb beginner questions.
..............................................................................
: De Clarke, Computing Resources Mgr.	           UCO/Lick Observatory, UCSC :
: de@helios.ucsc.edu |  Due to budgetary shortfalls, the light at the end of  :
: de@portal.bitnet   |  the tunnel has been turned off.               --Anon  :
Xref: sparky comp.lang.tcl:2285 comp.unix.aix:12963
From: mycroft@hal.gnu.ai.mit.edu (Charles Hannum)
Newsgroups: comp.lang.tcl,comp.unix.aix
Subject: Re: Truncated characters in AIX 3.2
Date: 4 Jan 1993 10:42:59 GMT
Organization: /etc/organization
NNTP-Posting-Host: hal.gnu.ai.mit.edu


In article <9301040750.AA17087@menora.weizmann.ac.il>
dov@menora.weizmann.ac.il (Dov Grobgeld) writes:
>
> I have compiled successfully tk 3.0 under AIX 3.2.2. All applications
> have some of the characters truncated on the right hand sight. It
> only happens in tk-based applications.

Once Upon a Time, this came up before.  The solution involved a patch
from IBM, though I don't recall which one.

Mainly, I'm just cross-posting this to see if anyone on comp.unix.aix
can recall the answer.

-- 
 \  /   Charles Hannum, mycroft@ai.mit.edu
 /\ \   PGP public key available on request.  MIME, AMS, NextMail accepted.
Scheme  White heterosexual atheist male (WHAM) pride!
Newsgroups: comp.lang.tcl
From: news@choreo.ca (Choreo NetNews Administration Account(Ottawa))
Subject: changing cursors
X-Disclaimer:  This news article was written by an employee or customer of
               Choreo Systems Inc., and does not necessarily reflect the
               opinions or views of the Managament of Choreo Systems Inc.
Organization: Choreo Systems, Ottawa Canada
Date: Mon, 04 Jan 1993 16:08:44 GMT

I want to be able to change cursors from the pointer to an hourglass when I
am off doing some processing in the app.  How do I do this?

Thanks!

Chris
chare@choreo.ca

Newsgroups: comp.lang.tcl
From: mwette@csi.jpl.nasa.gov (Matt Wette)
Subject: problems w/ bos-1.31
Originator: mwette@mr-ed
Organization: Jet Propulsion Laboratory
Date: Sat, 9 Jan 1993 00:42:28 GMT


I've just started with tcl (6.5) and wanted to get bos (1.31) to run.
The bosh program gives me the following error:

WARNING: error loading base (/usr/local/lib/bos/base/load): 
    while executing
"/usr/local/lib/bosbase"
WARNING: all of {base} failed to load.

The "base" files are in the directory "/usr/local/lib/bos/base".

Any clues?

Matt
-- 
mwette@csi.jpl.nasa.gov
From: welch@parc.xerox.com (Brent Welch)
Newsgroups: comp.lang.tcl
Subject: Re: images vs. bitmaps
Date: 11 Jan 93 17:24:15 GMT
Organization: Xerox PARC

mathew@elroy.Jpl.Nasa.Gov (Mathew Yeates) writes:

>I would very much like to be able to use color images the same way
>bitmaps are used. I've looked a bit at tkpixmap but
>1) It only looks applicable to someone writing C code, not wish scripts.
>2) Who knows if its up to date or not.

>Does anyone already done this stuff? I don't want to have to wait for
>future versions of Tk to do simple stuff like displaying images.

I've had good luck with the photo widget.  It is quite straight-forward
to include into wish.  You do need to provide some C code that reads
in your image and stuffs it into the photo widget, but you only need
to do that once and then bundle it into wish along with the photo widget.
The code comes with a sample reader for ppm files, and it was easy
to adapt that to my own needs.  You should be able to find the photo
widget in shar format in the archives on barkley.berkeley.edu
----------------------------------
	Brent Welch	Xerox-PARC

--

----------------------------------
	Brent Welch	Xerox-PARC
Newsgroups: comp.lang.tcl
From: shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall)
Subject: bind problem
Date: Thu, 07 Jan 1993 15:04:04 GMT
Reply-To: jay@vnet.ibm.com
Disclaimer: This posting represents the poster's views, not necessarily those of IBM
Organization: IBM Rochester, MN

How come I can do 
1)	bind . <FocusIn> {puts stdout "focus in"}
  but not
2)	bind . <FocusIn> +{puts stdout "focus in"}
  or
3)	bind . <FocusIn> +{puts stdout focus_in}

(2) results in the error message
	extra characters after close-quote
while (3) results in the message
	wrong # args: should be "bind window ?pattern? ?command?"

Both (2) and (3) seem to be problematic due to Tcl's parsing of the
command, probably because they begin with `+'.  Is this intentional?  If
not, perhaps the bind command could take a -append flag to allow forms
such as (2) and (3) while of course maintaining the current syntax.

I realize this is easy enough to work around, but it is occasionally
annoying (more so of late).

This is with tk2.3, AIX 3.2.2, x11r4.
-- 
: 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: dov@menora.weizmann.ac.il (Dov Grobgeld)
Subject: Truncated characters in AIX 3.2
Organization: Mail to News Gateway at Wang Labs
Date: Mon, 4 Jan 1993 07:46:00 GMT

I remember this has been mentioned before a long time ago, but
I can't find anything about it in the faq.

I have compiled successfully tk 3.0 under AIX 3.2.2. All 
applications have some of the characters truncated on the right 
hand sight. It only happens in tk-based applications.

What is the remedy for this? Is there any patch from IBM?

--
                                                        ___   ___
                                                      /  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: payne@crl.dec.com (Andrew Payne)
Subject: Re: Tk2.3/3.0: text search?
Organization: DEC Cambridge Research Lab
Date: Tue, 5 Jan 1993 14:25:57 GMT

In article <kfG_klG00h5K5H3Fhb@cs.cmu.edu> Sean.Levy@cs.cmu.edu writes:
>I notice, to my surprise, that the text widget includes no "search"
>command. 

Yes, I noticed this too, and I've had several occasions where such a feature
would have been useful.

I've been meaning to find some time to experiment with adding a regular
expression search as a text index modifier:  something that would allow
you to use indices like

	current searchf "aardvark"

which would evaluate to an index pointing to the first occurrence of the
string "aardvark" after the current pointer.



-- 
Andrew C. Payne
DEC Cambridge Research Lab
From: leech@cs.unc.edu (Jon Leech)
Newsgroups: comp.lang.tcl
Subject: Tk geometry errors
Date: 12 Jan 1993 20:32:45 GMT
Organization: The University of North Carolina at Chapel Hill
Distribution: world
NNTP-Posting-Host: mahler.cs.unc.edu

    Tcl 6.5, Tk 3.0, MIT X11R4, twm, HP-UX 8.05||SunOS 4.1.2||Ultrix 4.2.

    Tk and wish build OK, but the tk tests fail in option.test,
pack.test, and wm.test on all of our architectures with:

	bad geometry "+0+0": expected widthxheight

    A similar error occurs in the startup script for the point editor.
Should I try and narrow down where the error is occuring in the wish
script, or does someone recognize the problem from this and know how
to work around it? Thanks.

    Jon (leech@cs.unc.edu)
    __@/
Newsgroups: comp.lang.tcl
From: news@choreo.ca (Choreo NetNews Administration Account(Ottawa))
Subject: scrolling two lists
X-Disclaimer:  This news article was written by an employee or customer of
               Choreo Systems Inc., and does not necessarily reflect the
               opinions or views of the Managament of Choreo Systems Inc.
Organization: Choreo Systems, Ottawa Canada
Date: Tue, 05 Jan 1993 20:33:10 GMT

I have two listboxes which contain related information.  When one list is
scrolled I want the other scrolled for the same motion.  In addition, I want
to use only one scroll bar to control the two lists.

Thanks!

chare
chare@choreo.ca
Newsgroups: comp.lang.tcl,news.answers
From: garfield@cs.tu-berlin.de (Sven Delmas)
Newsgroups: comp.lang.tcl
Subject: Re: images vs. bitmaps
Date: 8 Jan 1993 11:03:31 GMT
Organization: Techn. Univ. Berlin (Germany)
Distribution: world
NNTP-Posting-Host: avalanche.cs.tu-berlin.de
In-reply-to: mathew@elroy.Jpl.Nasa.Gov's message of Thu, 7 Jan 1993 21:53:40 GMT

In article <mathew.726443620@henry> mathew@elroy.Jpl.Nasa.Gov (Mathew Yeates) writes:

   I would very much like to be able to use color images the same way
   bitmaps are used. I've looked a bit at tkpixmap but
   1) It only looks applicable to someone writing C code, not wish scripts.
   2) Who knows if its up to date or not.

   Does anyone already done this stuff? I don't want to have to wait for
   future versions of Tk to do simple stuff like displaying images.
I wrote the TkPixmap patch to add support for color pixmaps to Tk 2.3.
Right after Tk 3.0 came out I ported the patch and posted it to John
Ousterhout. He said he will probably try to incorporate it into Tk
3.1. If it is not part of Tk 3.1 I will publish the patch after Tk 3.1
is out. The complete patch is very big (for a small patch ;-), so I
want to wait for Tk 3.1, and see if it is incorporated.

Sven Delmas
--
----
  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
From: garfield@cs.tu-berlin.de (Sven Delmas)
Newsgroups: comp.lang.tcl
Subject: Re: TCL as widget server
Date: 11 Jan 1993 13:51:15 GMT
Organization: Techn. Univ. Berlin (Germany)
Distribution: world
NNTP-Posting-Host: desaster.cs.tu-berlin.de
In-reply-to: blk@mitre.org's message of Fri, 8 Jan 1993 21:20:50 GMT

In article <BLK.93Jan8162050@vanity.mitre.org> blk@mitre.org (Brian L. Kahn) writes:

   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?
A good way (in my opinion :-) to get the output from annother
application (using X) is accessing the server window id. My TkEmacs
widget works this way. I took the frame widget, and added some special
stuff to handle X events, and to communicate with emacs via tclRawTCP.

To display the output in the window of the frame widget I send the
window id of the frame widget to emacs. The patched emacs uses this
window id for his output. To receive events emacs creates a (never
mapped) window. The window id is sent to the frame widget. The frame
widget forwards all events to this window id. This scheme should work
with all X applications that use one toplevel window to show their
output.

I used this type of "reparenting" with emacs, ghostscript and gnuplot,
and it always worked (ghostscript and gnuplot where integrated into a
different widget set, not Tk). You have to patch the application you
want to integrate. Perhaps there is a way to prevent this, but right
now I see no way.

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
From: bydeley@bcarh3a.NoSubdomain.NoDomain (Brian Carroll)
Newsgroups: comp.lang.tcl
Subject: TK manual/text? (indexed)
Date: 8 Jan 93 16:18:00 GMT
Organization: Bell Northern Research

Keywords: 

Does anyone is aware of a TCL/TK manual, docs.. etc.. that would enable me to lookup a particular functions, and find the commands that I have to use.. ?? 

Any idea!!???

Please help.. 


Thank You

Numtzy.. Numtzy.. Very Numtzy

Luc

ttyl


Newsgroups: comp.lang.tcl
From: weinri@athena.cs.uga.edu (Kevin Weinrich)
Subject: Any repositories of tk widgets/programs out there?
Organization: University of Georgia, Athens
Date: Tue, 5 Jan 1993 20:02:20 GMT

Subject says it all.  Any ftp sites, or descriptions of things
folks have been creating?  I'm just getting started.  Thanks!

-Kevin Weinrich
(preferred address: kbw@helios.ath.epa.gov)
Newsgroups: comp.lang.tcl
From: blk@mitre.org (Brian L. Kahn)
Subject: Re: Emacs Re: TCL as widget server
Organization: The MITRE Corp. Bedford, MA
Distribution: comp
Date: Mon, 11 Jan 1993 16:08:21 GMT

I wrote:
   >I would like to use TCL to add scrollbars to emacs.  I don't want to

In article <C0MHBr.Lq@cs.columbia.edu> thayer@cs.columbia.edu (Charles Thayer) writes:
   I don't know about parenting to another processes window (my guess is
   you've got to modify emacs to get the x-window's id, and if you can do 
   that you might as well add the whole thing to emacs instead :)

I think I'm barking up the wrong tree.  X gets me confused, I'm not
really sure what reparenting does.  My favorite variant of emacs is
epoch, which is X-aware.  Epoch has a function that will reparent an
epoch screen under another xwindow id.  Maybe there isn't anything
that needs doing - maybe I just create a frame with wish, get the Xid,
and ask epoch to reparent under it?  So maybe what I need to ask is
these two questions:
 How do I get the Xid of a frame under wish?
 How can I give a child to a frame?


   But, I think the point is probably moot, since their is a lucid-emacs
   (which has x-windows support), tkemacs, and (of course) mxedit.

Oh no, the point is not moot.  Lemacs has no scroll bars, tkemacs has
been modified quite a bit (I want to use standard distribution), and
mxedit isn't really emacs at all, is it? 

B<
--
B<   Brian Kahn   blk@mitre.org   "may the farce be with you"
From: ouster@sprite.Berkeley.EDU (John Ousterhout)
Newsgroups: comp.lang.tcl
Subject: Re: tk3.1 ?
Date: 6 Jan 1993 19:39:34 GMT
Organization: U.C. Berkeley Sprite Project
Distribution: world
NNTP-Posting-Host: tyranny.berkeley.edu

In article <1993Jan05.141625.22912@rchland.ibm.com>, shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall) writes:
|> 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.

I'm hoping to get Tk 3.1 out shortly, but I'm not sure I'll be able to
get it done before the X Conference and USENIX, which will take up most
of the rest of January.
From: kuku@acds.physik.rwth-aachen.de (Christoph Kukulies)
Newsgroups: comp.lang.tcl
Subject: tk port to 386BSD
Date: 7 Jan 1993 09:28:04 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


I have compiled tk formally under 386BSD and XFree86. I said 'formally'
because I can start 'wish' and the hello example also works.

But for instance other examples like 'widget' only show a green squared
window with nothing in it and a wish: prompt in the startup window.

I'm not sure whether there still is a bug in 386BSD which prevents

 #!/usr/local/bin/wish -switch something

from properly working or if the cause is somewhere else.

Any comments welcome. Excuse if this might be an FAQ. I just joined the group
and printing the FAQ is under way :)

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

Newsgroups: comp.lang.tcl
From: johng@cimage.com (John Gourlay)
Subject: Re: Possible bug in lreplace
Organization: Cimage Corp, Ann Arbor, MI
X-Newsreader: Tin 1.1 PL5
Date: Mon, 11 Jan 93 15:30:08 GMT

I can reproduce the problem on a couple of different platforms.  I
haven't tried Tcl 6.5 yet, nor have I tried to debug 6.4.

John Gourlay

Newsgroups: comp.lang.tcl,comp.unix.aix
From: shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall)
Subject: Re: Truncated characters in AIX 3.2
Date: Mon, 04 Jan 1993 13:08:29 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 <1i94bjINN71k@life.ai.mit.edu>, mycroft@hal.gnu.ai.mit.edu (Charles Hannum) writes:
|> 
|> In article <9301040750.AA17087@menora.weizmann.ac.il>
|> dov@menora.weizmann.ac.il (Dov Grobgeld) writes:
|> >
|> > I have compiled successfully tk 3.0 under AIX 3.2.2. All applications
|> > have some of the characters truncated on the right hand sight. It
|> > only happens in tk-based applications.
|> 
|> Once Upon a Time, this came up before.  The solution involved a patch
|> from IBM, though I don't recall which one.

You need PTFs U402884 and U402887.  Contact Software Service and have your
customer number handy.  You should be able to just ask for those PTFs, I
would imagine.

-- 
: jay          jay@vnet.ibm.com    My opinions and ideas, not my employer's.
: shmdgljd@rchland.vnet.ibm.com    (c) Copyright 1992.  All rights reserved.
From: durian@advtech.uswest.com (Mike Durian)
Newsgroups: comp.lang.tcl
Subject: tclm0.1 - tcl with MIDI extensions (0/0)
Date: 12 Jan 93 20:26:11 GMT
Organization: U S WEST Advanced Technologies


  What follows is the source to tclm.  Tclm is a tcl interpreter
with some extensions that allow you to manipulate Standard MIDI
Files.  Furthermore, if you are lucky enough to be running
a copy of BSDI's BSD/386 and have a MPU-401 compatible MIDI
card you can play the MIDI files.
  This is a early release and I imagine there are many bugs.
Please let me know of any you find.  I'd also enjoy hearing
about any other suggestions, comments, fixes, scripts, etc.

Mike Durian - durian@advtech.uswest.com
Organization: Carnegie Mellon, Pittsburgh, PA
Newsgroups: comp.lang.tcl
Date: Mon,  4 Jan 1993 16:29:21 -0500 
From: Sean.Levy@cs.cmu.edu
Subject: Tk2.3/3.0: text search?

I notice, to my surprise, that the text widget includes no "search"
command. For even moderate texts, it seems to me a Very Bad Thing to
create the entire contents of a text as a string in core just for the
purpose of using regexp/string commands on it, while for large texts it
is a Total Disaster. Before I go digging through tkTextBTree.c and
friends, does anyone have any obvious solutions? The one that comes to
my mind is to use mxedit instead, but there are things about the text
widget I rather like...

Hoping I've overlooked something,
	Yours,
				-- 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)}
Newsgroups: comp.lang.tcl
From: jamensky@bnr.ca (Mark Jamensky)
Subject: Possible bug in lreplace
Reply-To: jamensky@bnr.ca (Mark Jamensky)
Organization: Bell-Northern Research Ltd.
Date: Thu, 7 Jan 1993 20:50:40 GMT

  The problem is exhibited as follows in Tcl version 6.4:

set l1 { a b "c c" d e f}

lreplace $l1 2 2
returns: a b d e f

lreplace $l1 3 3
returns: a b "c c e f

  For some reason the second quote gets removed.  Has anyone else seen this and
if so is there a patch?

  Thanks in advance.

--            | Bell-Northern Research - Ottawa | Conform or be cast out.
Mark Jamensky | jamensky@bnr.ca  (613) 765-4942 | - Rush
Newsgroups: comp.lang.tcl
From: wongi@netcom.com (Isaac Wong)
Subject: where to ftp xf?
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Wed, 6 Jan 1993 00:55:26 GMT


the subject says it all. thanks.

Newsgroups: comp.lang.tcl
From: spencer@med.umich.edu (Spencer W. Thomas)
Subject: Re: scrolling two lists
Date: Thu, 07 Jan 93 14:01:21 EST
Organization: University of Michigan

In article <1993Jan05.203310.11620@choreo.ca> news@choreo.ca (Choreo NetNews Administration Account(Ottawa)) writes:
> I have two listboxes which contain related information.  When one list is
> scrolled I want the other scrolled for the same motion.  In addition, I want
> to use only one scroll bar to control the two lists.

Try this

listbox .l1 -relief raised -yscroll {lscroll .l2}
listbox .l2 -relief raised -yscroll {lscroll .l1}
scrollbar .s -orient vertical -command {lview}

# Scroll both listboxes from the scrollbar
proc lview {where} {
  .l1 yview $where
  .l2 yview $where
}

# Scroll the other listbox and the scrollbar
proc lscroll {what total window first last} {
  $what yview $first
  .s set $total $window $first $last
}


foreach l {a b c d e f g h i j k l m n o p} {
  .l1 insert end $l
  .l2 insert end $l
}

pack append . .l1 {left filly} .l2 {left filly} .s {left filly}


--
=Spencer W. Thomas 		|  Info Tech and Networking, B1911 CFOB, 0704
   "Genome Informatician"	|  Univ of Michigan, Ann Arbor, MI 48109
Spencer.W.Thomas@med.umich.edu	|  313-747-2778, FAX 313-764-4133
Newsgroups: comp.lang.tcl