HDTenEightyP/NetNews huggingface dataset:
From: lusk@donner.mcs.anl.gov (Rusty Lusk)
Newsgroups: comp.lang.tcl
Subject: Re: printing a canvas
Date: 27 Jan 93 21:10:24 GMT
Reply-To: lusk@donner.mcs.anl.gov (Rusty Lusk)
Organization: Argonne National Laboratory, Chicago, Illinois

In article <1k6igdINNqnj@cae.cad.gatech.edu>, estephen@whosnext.cad.gatech.edu (Eric R Stephens) writes:

> How do you print canvases?

I just discovered this, and it works great.  For some reason it is not 
described in the man page for canvases.  You can figure out the possible
options by looking in the source code, however.  Here is an example:

button .buttonframe.print -text Print -borderwidth 2 -command print

proc print {} {
   .canvas postscript -file $filename -x 0 -y 0 -width 500 -height 500
    }

When you hit the button you get a file with nice color postscript 
for the canvas.  Goddbye forever to screendumps.  The only problem is that
it seems to ignore the backgound color of the canvas (always comes out white),
but you can draw a big rectangle on the canvas to take care of this.

- Rusty Lusk
From: allan@stasys.UUCP (Allan Brighton)
Newsgroups: comp.lang.tcl
Subject: bounding box for canvas text too long ?
Keywords: tk text
Date: 21 Jan 93 22:24:33 GMT
Organization: Brighton Software


I'm trying to draw a line from one canvas text item to another and I'm
having trouble getting the line to touch the right side of the text.

If I use the "$canvas bbox ..." command to draw a box around the text,
it looks like this:

   +-------------+
   |sample-text  |
   +-------------+

There is always a space of one or two characters too much on the right
side.  Is there a way to get around this ?

(I can't use "$canvas coords ..." because the text may be grouped together
with other items and in that case I need the bounding box of all the items.)

Thanks,


---

	Allan Brighton

	Freelance Software Consultant
	Munich, Germany
	E-mail: allan@piano.sta.sub.org
From: damurphy@wc.novell.com (Duane Murphy)
Newsgroups: comp.lang.tcl
Subject: Re: DOSTCL62 and 4DOS problem
Date: 21 Jan 93 17:35:01 GMT
Organization: Novell, Inc.
X-Xxdate: Thu, 21 Jan 93 17:42:24 GMT
X-Useragent: Nuntius v1.1.1d12

In article  George Wu, grw@oahu.cs.ucla.edu writes:
>  The version of 'tcltest' based on dostcl62 running under 4DOS can
>not 'exec' for some reason.  The error message printed out is always
>"Access error ...".  I have traced the problem to a system() call in
>the dos_exec.c module, it always fails (i.e. returns -1  The same
>tcltest seems fine running under COMMAND.COM.  Does anyone have any
>idea what's causing the problem under 4DOS ?  Any comment is greatly
>appreciated.

Dollars to donuts says that the exec does the shell wrong.  I'll bet exec 
tries to run COMMAND.COM instead of using the COMSPEC environment 
variable.  4DOS warns that some programs shell incorrectly and cause this 
problem.  The exec command is probably broken.

Just a thought,
...Duane

  +------------------------+--------------------------------------------+
  | Duane Murphy           | My opinions are mine, mine, and only mine; |
  | damurphy@wc.novell.com |      Except when they are also yours.      |
  | Macintosh Software QA  |                                            |
  +------------------------+--------------------------------------------+
Newsgroups: comp.lang.tcl
From: shumakrj@rtsg.mot.com (John Shumaker)
Subject: Wish button problem
Organization: Motorola Inc., Cellular Infrastructure Group
Date: Mon, 25 Jan 1993 17:35:21 GMT



I am running TclX 6.4c, Tk version 2.3, and Xf version 1.4 on a Sun3 
workstation.  

Every time I hit a button widget I get the following sequence of errors:

can't read "tk_priv(relief)": no such element in array
    while executing
"$w config -relief $tk_priv(relief)..."
    (procedure "tk_butUp" line 3)
    invoked from within
"tk_butUp .frame1.button0"
    (command bound to event)


The only documentation error I can find is that the tk_priv array should
not be used by programmers.  It is only used internally by Tcl.

Has anyone run into this problem or something similar?



Thanks,
John Shumaker
Motorola Cellular Infrastructure Group
shumakrj@motcid.rtsg.mot.com
(708) 632-4048
From: rfanta@cea.berkeley.edu (Richard Fanta)
Newsgroups: comp.lang.tcl
Subject: Real-time graphing widget needed, clueless on Tcl/Tk
Date: 21 Jan 93 14:24:45
Organization: CEA @ UC Berkeley, Berkeley, CA, USA.
Distribution: world
NNTP-Posting-Host: newport.cea.berkeley.edu


Hi there, 

I originally posted to comp.windows.x (please see the original post
below) looking for advice on how to do real-time graphing in X in a
more robust way than using the stripchart widget in Xaw.  Someone
(thank you, Oliver Jones) told me that Tcl/Tk might be able to help
and has some cool real-time strip chart widgets and the like.

Could someone point me in the right direction, and tell me where to get started with Tcl, etc?

Much thanks,

Rick 

---------------------------------------Cut Here--------------------------------------

From rfanta@cea Wed Jan 20 16:00:21 1993
From: rfanta@cea (Richard Fanta)
Newsgroups: comp.windows.x
Subject: Real-time graphing - call for suggestions
Date: 20 Jan 93 13:55:12
Organization: CEA @ UC Berkeley, Berkeley, CA, USA.
Distribution: world
NNTP-Posting-Host: newport.cea.berkeley.edu


Hi there,

I work for the Center for EUV Astrophysics at UC-Berkeley and we're
trying to develop some real-time graphing applications to aid us
with trend analysis for our satellite, the EUV (Extreme UltraViolet)
Explorer.  I'm not exactly an X guru yet, so advice of all sorts would
be helpful and well heeded.

Basically, what we want to do is plot at least a single monitor
value (Detector photon count rates, mirror temperatures, et al.)
versus time so that we can see if anything is degrading or suffering
>from other unforseen fluctuations.  Different monitors come down in
different multiples of roughly one second intervals.  

What sorts of real-time graphing capabilities exist via the public
domain?
[Something beyond the stripchart widget in Xaw would be nice.]
In commercial software? 
[I've started to contacting vendors, but tips would be appreciated.]

Nice features to have:
  -some sort of hardcopy output, preferably Postscript is necessary
  -selectable auto or manual scaling 
  -multiple plots on the same time axis (values possibly coming down
   at different rates)
  -mouse selectable time segments and/or ability to do blowups of key
   graph segments
  -basic axis labeling, selectable bars or point styles, etc.

Right now we're using X11R4/5 and twm for the displays instead of
Openwindows mainly because of performance issues (ie. 8Mb of memory
vs. the 16Mb now on Sparcstations) on the workstations when the
original software was developed.  It may now be possible to use
OpenWindows/XView or some other solution.  Obviously it would be nice
to be able to run existing Xt-based programs w/o modification.

Once again, all tips are much appreciated.

Much thanks,

--------------------------------------------------------------------------------
Rick Fanta			e-mail: rfanta@cea.berkeley.edu
Center EUV Astrophysics		

--
--------------------------------------------------------------------------------
Rick Fanta			e-mail: rfanta@cea.berkeley.edu
Center EUV Astrophysics		
Newsgroups: comp.lang.tcl
From: arorav@bnr.ca (Vikas Arora)
Subject: Reverse Video Problem for drawing widgets.
Organization: Bell-Northern Research Ltd., Ottawa, Ontario, Canada
Date: Fri, 22 Jan 93 14:32:34 GMT


I have an application which uses TK2.3 and helps in drawing lines and
recangles on the canvas. When I run my application setting my Xresources
background "black" and foreground as "white" I am not able to see the
widgets drawn. It seems to me that I will have to use appropriate fill values
based on the foreground and background values set in the Xresource file
while drawing the widgets on the canvas.

Is this the right way?
Has anyone faced a similar problem?. 
Any suggestions/comments to deal with this problem will be highly appreciated. 

Thanks,

----------------------------------------------------------------------------------
Vikas Arora                             email: arorav@bnr.ca
Software Engineering Centre             Phone: (613) 763-3353 (w)
Bell-Northern Research                         
Ottawa-Canada
----------------------------------------------------------------------------------

Newsgroups: comp.lang.tcl
From: brad@cac.washington.edu (Brad Greer)
Newsgroups: comp.lang.tcl
Subject: Double Click not seen
Date: 26 Jan 1993 19:46:24 GMT
Organization: University of Washington
Distribution: world
NNTP-Posting-Host: shiva2.cac.washington.edu

Setup:
   Dec 5000 running Ultrix 4.2a
   TK3.0 or TK2.3  wish 
   Motif 1.1

Problem:  When I bind a Double-1 click event to a listbox item, it works
          only if I *DON'T* have a Motif key binding that says:
  
             <Btn1Down>          window                  f.raise

 I suspect that wish is looking for a <Button1><Button1> event stream,
but Motif may be including a raise event in-between the Button events so
the expected is never 'seen' ????   Is there an easy fix?

 A side note - Double clicks work ok on other X apps (like Xrn) with the
same Motif binding in-place.

-- 

****************************************************************************
Brad Greer - Software Engineer          
  Networks and Distributed Computing
  University of Washington
  INTERNET: brad@cac.washington.edu    TELEPHONE: (206) 685-4179
****************************************************************************
From: louie@sayshell.umd.edu (Louis A. Mamakos)
Newsgroups: comp.lang.tcl
Subject: Re: Multiple Interpreters
Date: 28 Jan 1993 14:45:45 GMT
Organization: The University of Maryland, College Park
NNTP-Posting-Host: sayshell.umd.edu

In article <1993Jan28.033005.23086@wuecl.wustl.edu> omar@wucs1.wustl.edu (Omar El-Ghazzawy) writes:
>
>I know there must be many good uses for having multiple interpreters, but
>I can't seem to think of any.

I have an application that I'm developing which associates some TCL
"state" with Objective-C objects.  The Object has methods which are
invoked by TCL commands, etc.  The great thing about having multiple
interpreters available is that you have a seperate name space (both
for commands and variables) which reflect the existing objects and
classes in the program.

I haven't hacked his stuff into my code yet, as I'm "faking" much of
it now, but I look forward to giving it a try.  It seems just perfect
for my application.

Actually, it would be great if a new interpreter could inherit
methods/commands from the "super class" or the interpreter that
created it, but I can see how that might be difficult to implement.

Louis Mamakos

Newsgroups: comp.lang.tcl
From: simmdan@ux1.isu.edu (Daniel Simmons)
Subject: Re: How difficult is a restricted tcl shell ?
Keywords: shell user supervisor interpreter
Organization: Idaho State University, Pocatello
Date: Fri, 22 Jan 1993 12:19:19 GMT

In article <brucet.727682251@extro.ucc.su.OZ.AU> brucet@extro.ucc.su.OZ.AU (Bruce Tulloch) writes:
>Is something along the lines of a restricted tcl shell or "user" and
>"supervisor" mode easily implemented ? For example, in supervisor mode,
>all commands, procedures and variables are visible and usable (just
>like tcl is now). In user mode, only a restricted set of commands,
>procedures and variables are available and usable from the shell, and
>certain procedures are protected from view (as described below
>perhaps). "Supervisor" commands and procedures would still be available
>if called from within a procedure and user/super mode could be changed
>via a new built-in command (that accepts a password maybe) so that more
>experienced users or developers could have full access.
>
>Anyone else done/though/dream't about an idea like this ?

Well, I'm just at the thought/dream't state at the moment, but...

As a part of a Campus Wide Information System for Idaho State University,
I've been implementing a menu system based on Tcl.  Menu definitions are
all in Tcl, and the users actually get a Tcl interpreter to type menu
choices into (they just don't know it).  That is, the user is presented
with a menu of numbered options and a command prompt.  When they type
number "5" for instance, they are actually calling a Tcl procedure named
"5" which carries out the action named on the menu.

Anyway, at the moment, they have full access to the interpreter, but it
is my plan to eventually have two interpreters.  One is for the users
and will have most everything disabled (ie. no exec or any other way to
get to a subshell, etc.).  It will also have at least one command added
from C which will be used for choosing menu items.  In this case, when
they type "1", it will actually call a C procedure which will pass the
command "go 1" into a separate interpreter.  The second interpreter 
will have the full set of Tcl commands plus the application specific
commands.

Does this kind of describe what you're thinking about?  Anyone else
have thoughts/comments?

Danny
-- 
Daniel Simmons          electronic mail : simmdan@isu.edu
Idaho State University       voice mail : (208) 236-3199
Computer Center              snail mail : Box 8037, Pocatello
Newsgroups: comp.lang.tcl
From: zoom@athena.mit.edu (Manish D Muzumdar)
Subject: readtiff for photo widget
Keywords: photo
Organization: Massachusetts Institute of Technology
Date: Wed, 20 Jan 1993 23:58:04 GMT

Does anyone know where I can find a readtiff.c and/or readgif.c
for Paul Mackerras's photo widget?

Thanks.

Manish

Newsgroups: comp.lang.tcl
From: feirtag@wave3i.nrl.navy.mil (Fred Feirtag)
Subject: WANTED--Rx for Anemic Colors:
Organization: Naval Research Lab, Washington, DC
Date: Thu, 21 Jan 1993 21:24:48 GMT

When I run the following program under Tk 3.0, I get two different
colors:

+---------------------------------------------------------------------------+
| #!/usr/local/bin/wish -f                                                  |
|                                                                           |
| pack append . \                                                           |
|   [label .bisque1 -text {This is bisque1} -bg bisque1] {pady 50 fill} \   |
|   [label .default -text {What is this?}] {pady 50 fill}                   |
|                                                                           |
+---------------------------------------------------------------------------+

I don't think this is as it should be.  First of all,

>>> How Can One Ask Tk The Current Colors For A Given Window/Widget?

I found "bisque1" by looking in the source, "default.h," specifically,
but this shouldn't be necessary, should it?

Also, when I run this under an old "pre-alpha" release of Tk (dated
exactly two years ago today), the bottom, default, color ***DOES*** match
the explicitly requested bisque1 of the top label.

I'm working on an Iris, and I build the old Tk before IRIX had much
support for X-windows, so I linked that one with X stuff I got from
MIT, as opposed to what IRIX now provides.  There are lots of differences,
but I'm guessing that this is a bug that's crept into Tk???

Please try this code on your system & post if the colors match.

Fred

-- 

Fred Feirtag                    |
Naval Research Lab, Code 7120   |  "Well . . . 'Spam, Eggs, Bacon, Sausage
Washington, DC  20375           |   and Spam' hasn't got MUCH Spam in it."
feirtag@wave.nrl.navy.mil       |            --Monty Python
(202) 404 - 8502                |
From: spencer@med.umich.edu (Spencer W. Thomas)
Newsgroups: comp.lang.tcl
Subject: Re: printing a canvas
Date: 27 Jan 93 15:23:30
Organization: University of Michigan HSITN
NNTP-Posting-Host: guraldi.itn.med.umich.edu
In-reply-to: estephen@whosnext.cad.gatech.edu's message of 27 Jan 1993 17:58:37 GMT

In article <1k6igdINNqnj@cae.cad.gatech.edu> estephen@whosnext.cad.gatech.edu (Eric R Stephens) writes:

> How do you print canvases?

Get tk3.0.

Build your canvas (don't use "window" items).  Suppose it's called .c

exec lpr << [.c postscript]

--
=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
From: Duane Murphy <damurphy@wc.novell.com>
Subject: Re: Multiple Interpreters
X-Xxdate: Thu, 28 Jan 93 21:12:47 GMT
Organization: Novell, Inc.
X-Useragent: Nuntius v1.1.1d12
Date: Thu, 28 Jan 1993 21:05:10 GMT

David Herron, david@twg.com writes:
>`unknown' looks for unknown commands in its parent before it looks
>in MainInterp.  Yes that's not quite the same thing as inheritance.
>The other inheritance facility is `-chainCommand' (if someone can suggest
>improved names for these things, I'm all ears...).  Again, it's manual
>but works like:
>
>	interp newInterp
>	foreach cmd { a list of commands to inherit } {
>		newInterp -chainCommand $cmd parentInterp
>	}

It is interesting to note that you have actually solved a short coming of 
typical objkect-oriented inheritance.  That is when you inherit you get 
everything the parent has and add new features.  Taking away features is 
actually quite difficult (not impossible, just not straightforward).  
With this method, you pick what you want to inherit from the parent.

...dam

  +------------------------+--------------------------------------------+
  | Duane Murphy           | My opinions are mine, mine, and only mine; |
  | damurphy@wc.novell.com |      Except when they are also yours.      |
  | Macintosh Software QA  |                                            |
  +------------------------+--------------------------------------------+
From: mathew@elroy.Jpl.Nasa.Gov (Mathew Yeates)
Newsgroups: comp.lang.tcl
Subject: Re: Can windows be dragged on a canvas?
Date: 22 Jan 93 19:09:04 GMT
Organization: Image Analysis Systems Group, JPL
NNTP-Posting-Host: henry.jpl.nasa.gov

spencer@med.umich.edu (Spencer W. Thomas) writes:

>I've done this.  You have to make the bindings to the window, not to
>the canvas:

>    # Bind the actions ($f is the window name, $theCanvas is the
>    # canvas name).
>    bind $f <B3-Motion> "itemDrag $theCanvas \
>				    \[expr %x+\[winfo x $f]]\
>				    \[expr %y+\[winfo y $f]] $field";
>    bind $f <3> "itemStartDrag $theCanvas \[expr %x+\[winfo x $f]]\
>				    \[expr %y+\[winfo y $f]]";

Any idea why the following doesnt work? Source from within wish

------------------------------------------------------------------

canvas .canvas -scrollregion {0 0 800 400} -width 800 -height 400
frame .canvas.frame
text .canvas.frame.photo -background black
pack append .canvas.frame .canvas.frame.photo {top}
.canvas create window 0 0 -window .canvas.frame -anchor nw -tags canvasitem
pack append . .canvas {top}

bind .canvas.frame.photo <1> "itemStartDrag .canvas \
	\[expr %x+\[winfo x .canvas.frame.photo]]\
	\[expr %y+\[winfo y .canvas.frame.photo]]";

bind .canvas.frame.photo <B1-Motion> "itemDrag .canvas \
	\[expr %x+\[winfo x .canvas.frame.photo]]\
	\[expr %y+\[winfo y .canvas.frame.photo]]";

proc itemStartDrag {c x y} {
    global lastX lastY
    set lastX [$c canvasx $x]
    set lastY [$c canvasy $y]
puts stdout "start _[$c type current]_ $lastX $lastY"
}
proc itemDrag {c x y} {
    global lastX lastY
    set x [$c canvasx $x]
    set y [$c canvasy $y]
    $c move current [expr $x-$lastX] [expr $y-$lastY]
    puts stdout  "[expr $x-$lastX] [expr $y-$lastY]"
    set lastX $x
    set lastY $y
}    
--------------------------------------------------------
if "current: in itemDrag is replaced by the tag "canvasitem" then
the text window does, indeed, drag. But not correctly. It appears
to lag behind the cursor. What am I doing wrong?


Mathew Yeates
Newsgroups: comp.lang.tcl
From: swogryze@napier.uwaterloo.ca (Steve Ogryzek)
Subject: Re: radiobuttons
Keywords: radiobuttons
Organization: University of Waterloo
Date: Mon, 25 Jan 1993 17:00:07 GMT


To do what you wish to do you need to associate a variable with each set
of radiobuttons you wish to use.  For example:

radiobutton .button1 -variable group1 -value one -text button1
radiobutton .button2 -variable group1 -value two -text button2

radiobutton .button3 -variable group2 -value one -text button3
radiobutton .button4 -variable group2 -value two -text button4

So now .button1 and .button2 will act separately from .button3 and .button4
Also you can now change the value of the radiobuttons in your program by
setting the value in group1 or group2 to be either one or two.  In other words,
let's say .button1 is currently selected.  You can change the selection to 
.button2 buy executing the following instruction "set group1 two" (but this
does not automatically invoke the instruction associated with the radiobutton)

Hope this helps,
-Steve


p.s.  Hi Mark!!
Newsgroups: comp.lang.tcl
From: kue@zerberus.gud.siemens.co.at (D.I.Werner Kuehnert)
Subject: radiobuttons
Date: Fri, 22 Jan 1993 07:42:14 GMT
Organization: Siemens AG Oesterreich
Keywords: radiobuttons

Hi !

I have a novice question :

I would like to have several sets of _INDEPENDENT_ radiobuttons.
(One set of four buttons, a second set of 8 buttons and for instance
a third set of 2 buttons). When I select one button of a set I don't
want the selected button of the other sets to be deselected.

Any hints ?

	Thank You in advance
		Werner Kuehnert

/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
|	E-Mail : kue@zerberus.gud.siemens.co.at       	|
|	Tel.   : 0043-222-60171-5205			|
|	FAX    : 0043-222-60171-5202			|
\_______________________________________________________/
Newsgroups: comp.lang.tcl
From: halazar@media.mit.edu (Michael Halle)
Subject: Re: WANTED--Rx for Anemic Colors:
Organization: M.I.T. Media Laboratory
Date: Thu, 21 Jan 1993 23:06:25 GMT


I know that the SGI X server does some weird things to gamma correct
colors.  For example, if you ask for pixel values (#rrggbb) you get
the exact pixel values, but if you ask for a color by name, you get a
gamma corrected value instead.  As a result, numerically specified
colors are washed out.  Try your experiment using the color values
found in rgb.txt for bisque1 rather than the name directly and see
what the result is.

This might not be the problem, expecially because the old version of
Tk worked.  Did the old version ask for bisque1 by name?


						Michael Halle
						Spatial Imaging Group
						MIT Media Lab
						mhalle@media.mit.edu
Newsgroups: comp.lang.tcl
From: tdoan@bnr.ca (Tuan Doan)
Subject: Determining fonts availability
Date: Thu, 28 Jan 1993 17:08:24 GMT
Organization: Bell-Northern Research, Richardson, Tx.
Keywords: FONTS, TCL/TK, ENVIRONMENT

Hello,

   Does anyone know of a way to detect for a certain fonts inside TCL/TK?  I
am writting an application that would not work on a different machine because
they do not have the font 'installed'.  It would be nice if there is a 
default way of telling TCL/TK to grab for the font(s) that the user is using
under xterm.

Thanks,

 __  __/  /   /   __  /    |   /    Tuan T. Doan
    /    /   /   /   /   / |  /     Advance Signalling Design
   /    /   /   __  /   /  | /      2201 Lakeside Blvd.  P.O. Box 833871
__/  ______/ __/ __/ __/  __/       Richardson, TX 75083-3871
                                    Phone: 6-444-4575/214-684-4575
Internet:  tdoan@bnr.ca             Fax:   6-444-3716/214-684-3716
      or   tdoan@x400gate.bnr.ca    
Newsgroups: comp.lang.tcl
From: schwartz@roke.cs.psu.edu (Scott Schwartz)
Subject: Lots of lines
Distribution: comp
Date: Fri, 22 Jan 1993 18:39:56 GMT

  I have an application that draws lots and lots of lines on a canvas.
So many lines, in fact, that using the builtin canvas segment command
is impossibly inefficient, largely because it results in one X request
per segment, but also because of all the tcl activity.  What I've done
is to provide a new canvas command, "segments", which draws N
disconnected line segments (in one X operation), but is otherwise
similar to the "segment" command.  I'd like to see something along
these lines as a standard part of Tk; what do you all think?
Newsgroups: comp.lang.tcl