HDTenEightyP/NetNews huggingface dataset:
From: lwv26@cas.org (Larry W. Virden)
Subject: OpenWindows and Tk - is there anything I can do?
Reply-To: lvirden@cas.org (Larry W. Virden)
Organization: Nedriv Software and Shoe Shiners, Uninc.
Date: Thu, 1 Oct 1992 14:42:40 GMT


Okay.  Here is my current setup - but note that this has been going on
for a year or more.

Sun SPARCstation 1+, SunOS 4.1.2, OW 3.0, olvwm 3.2
Tk 2.3, Tcl 6.4, Extended Tcl 6.4b.

What I am seeing at least 60% of the time is the following error:

olvwm: Warning, X Error: BadValue (integer parameter out of range for operation)
  Request Major code: 12
  Request Minor code: 0
  ResourceId 0x0

What I would to find out is

a) what is the fix for this

if no one knows that one then,

b) what is the best approach for locating the problem here

Thanks!
-- 
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: thayer@cs.columbia.edu (Charles Thayer)
Subject: Re: emacs-like bindings for text widget?
Organization: Columbia University Department of Computer Science
Date: Wed, 30 Sep 1992 02:31:29 GMT

In article <1992Sep28.171329.7647@rchland.ibm.com> jay@vnet.ibm.com writes:
>Anyone have a set of bind commands for the text widget that will provide
>emacs-like functionality?  If so, please send me (or post, I'm sure others
>will be interested.)

Never used it myself, but gnu provides readline, which is supposed to
give you emacs-style line editing.  [Check your local archie, probably
at prep.ai.mit.edu] Also available is ccmd (written at Columbia) which
allows one to set up editing and completion as well.

/charles
-- 
==============================================================================
Charles Thayer, Columbia University, Dept. CS, Tech-staff... my words only.
Newsgroups: comp.lang.tcl
From: shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall)
Subject: Passing -h to a wish script
Date: Wed, 30 Sep 1992 14:08: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

I've got a wish script that I would like to be able to respond to the -h
flag, e.g.,

> ./foo -h
foo: USAGE: foo <options>
blah blah blah

Unfortunately, when I do that, wish seems to grab the -h and print out its
own usage options.

Expect has a similar feechur, but you can sidestep its grabbing by using

#!/usr/local/bin/expect --

rather than

#!/usr/local/bin/expect -f

Could wish be changed to allow this sort of thing as well?

-- 
: 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: jamensky@bnr.ca (Mark Jamensky)
Subject: Re: Cursor woes
Reply-To: jamensky@bnr.ca (Mark Jamensky)
Organization: Bell-Northern Research Ltd.
Date: Tue, 29 Sep 1992 17:54:16 GMT

  I had the exact same problem and Dr. Ousterhout asked for my script.  Here
is his reply:

This is in response to your message about unexpected redisplays when all
you did was change the cursor for a frame.  The problem is that you have
created a fight over the geometry of the frame ".entry_frame".  First,
you specified a -geometry option for the frame, so the frame requests
this geometry on its own.  Second, you've packed children into the frame,
so the packer requests a geometry for the frame that's big enough to
hold all of its children.  These two requests conflict and cause the
redisplay as they fight over the proper geometry for the frame (the
packer eventually wins).  If you pack things into a frame then you
shouldn't specify a geometry for it:  the packer will do that for you.



  Of course once I removed the geometry requests from the frame, the 
"shimmering" effect stopped.


-- 
Mark Jamensky  jamensky@bnr.ca  Bell-Northern Research  Ottawa  (613) 765-4942
From: donald@strawberry.UK.Sun.COM (Donald Edgar - SUN Scotland)
Newsgroups: comp.lang.tcl
Subject: Changing default Tk mouse bindings
Date: 29 Sep 1992 15:09:28 GMT
Organization: Sun Microsystems
Distribution: world
Reply-To: donald@strawberry.UK.Sun.COM
NNTP-Posting-Host: strawberry.uk.sun.com
Keywords: Tk

I'm trying to change the default mouse bindings for menu buttons from button 1 to
button 3. I've been unable to identify the code responsible for this behaviour -
could someone point me in the right direction?


Regards,

	Donald



Newsgroups: comp.lang.tcl,comp.lang.tcl
From: gwlester@cpu.com (Gerald W. Lester)
Newsgroups: comp.lang.tcl
Subject: Re: .Xresources/.Xdefaults resource specifications
Date: 29 Sep 92 14:42:43 GMT
Reply-To: gwlester@cpu.com
Organization: Computerized Processes Unlimited, Metairie, LA, (504)-889-2784

In article <1992Sep26.150226.1783@NeoSoft.com>, karl@NeoSoft.com (Karl Lehenbauer) writes:
Karl,

	Instead of doing:

>
>    Tk_SetClass(w, "Tk");
>
>It might be cool to change it to do a
>
>    Tk_SetClass(w, argv[0]);
>

	How about using "Tk" with argv[0] appended on the end, then (and please
correct me if I'm wrong), you could, for application foo, have:

>You can put things in your .Xdefaults like:
>
>    Tk*activeBackground:    LightBlue
>    Tk*background:  LightSteelBlue
>    Tk*activeForeground:    blue
>    Tk*foreground:  black

    *foo*activeBackground:    LightGreen
    *foo*background:  LightRed
Newsgroups: comp.lang.tcl
From: pdel@ADS.COM (Peter Delevoryas)
Subject: Noidle doesn't work for me
Organization: Advanced Decision Systems, Mtn. View, CA (415)960-7300
Distribution: usa
Date: Wed, 30 Sep 1992 00:09:18 GMT


Well, it works but my terminal still logs me out:

bert(33)-> ps aux| grep expect
pdel      6228  0.4  1.3  140  188 p5 S    13:10   0:01 /bin/expect /afs/ads.com
pdel      6258  0.0  1.3   32  184 q0 S    13:15   0:00 grep expect
bert(34)-> date
Tue Sep 29 13:25:45 PDT 1992
bert(35)-> date
Tue Sep 29 13:35:46 PDT 1992
bert(36)->
[Connection to BERT idle too long; timed out]


Script:

#!/bin/expect  
#Name: noidle
#Description: expect script to run a shell which avoids being "autologged out"
#        by sending a <space><delete> every hour if no other I/O has occurred.
#Author: Don Libes, December 30, 1991

set timeout 600
log_user 0
system stty -echo raw
spawn $env(SHELL)
expect	{
	timeout {send "date\n"; continue -expect}
	-re .+ {send_user $expect_out(buffer); continue -expect}
	-i $user_spawn_id -re .+ {send $expect_out(buffer); continue -expect}
}
system stty echo -raw





Any ideas welcome

thanks, PD
--

 login name:   L1-A                      
 In real life: Peter Delevoryas
 In any other life: a cheap imitation
Newsgroups: comp.lang.tcl
From: shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall)
Subject: Excluding modifiers when bind-ing
Date: Tue, 29 Sep 1992 21:25:30 GMT
Reply-To: jay@vnet.ibm.com
Disclaimer: This posting represents the poster's views, not necessarily those of IBM
Organization: IBM Rochester, MN

I'd like to set up a bind for a text widget much like the default binding
from tk.tcl:

bind Text <Any-KeyPress> {
    if {"%A" != ""} {
	%W insert insert %A
	%W yview -pickplace insert
    }
}

except I'd like it to be for any keypress where the Ctrl key is _not_ a
modifier.  I RTFM and didn't find any means of excluding modifiers like
in translations for Xt/Motif.  I also didn't see anything I could pass
to my command that I could check the modifier state.

Is there a way to do this that I overlooked? (I hope!)  Thanks.

-- 
: 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: tjj@thumper..bellcore.com (J Tim Jordan)
Subject: Re: Pre-creating Dialog Boxes
Reply-To: tjj@thumper.UUCP (J Tim Jordan)
Organization: Bellcore MRE
Date: Thu, 1 Oct 92 13:56:32 GMT

In article <1992Oct01.120827.24948@rchland.ibm.com> jay@vnet.ibm.com writes:
>In article <1992Sep30.235241.2993@twg.com>, david@twg.com (David Herron) writes:
>|> In article <1992Sep29.155059.15038@awdprime.austin.ibm.com> madere@julius.austin.ibm.com (Steve Madere) writes:
>|> >Is there any way to "unmap/remap" a window in Tk using code at the Tcl
>|> >level?
>|> 
>|> I don't recall if there's a command in tk already to map/unmap windows
>|> but it ought to be trivial.  The equivalent in Xt is:
>|> 
>|> 	#define XtMapWidget(widget) \
>|> 		XMapWindow(XtDisplay(widget), XtWindow(widget))
>|> 
>|> and I recall there being similar concepts present in tk...
>
>You can try
>
># for unmap
>wm withdraw $toplevel
>
># for map
>wm deiconify $toplevel

I've noticed a problem with the above solution. If you were to

toplevel .t 
wm withdraw .t

the window won't be withdrawn. I found that I need to wait about 3 seconds
or so after creating the toplevel before withdrawing it. This is a problem
because I precreate about 10 toplevels and map and unmap them
as the user needs them but initially when they are created and 
withdrawn about 3 seconds latter, makes the screen look like 
a fireworks exhibition with all the windows being created and
going away. Has anybody already addressed this?
tim
From: shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall)
Subject: Cursor woes
Date: Tue, 29 Sep 1992 12:57:21 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 can I change the pointer to the watch cursor over the entire wish
window ?  When I do ``. configure -cursor watch'', I get
``invalid command name "."''

For right now, I'm trying to side step the issue by having a frame child
which is the parent of everything else.  I then configure the frame to
have the new cursor.

However, whenever I change the cursor, my entire window shrinks, then
expands back to its original size.  While an interesting visual effect,
it is not really desired.

And of course, this doesn't work for the text widget, as they define their
own cursor.

Basically, what I'm looking for is some means of changing the cursor to a
watch over the entire app, then restoring the original cursor.

In Motif, I could XDefineCursor() over my toplevel widget for the watch,
then XUndefineCursor() and the cursors reverted to what they were before.

It seems that in Tk I cannot define a cursor over the entire app but must
set it over each widget individually, then restore them individiually as
well.

-- 
: 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: shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall)
Subject: Re: Excluding modifiers when bind-ing
Date: Wed, 30 Sep 1992 21:27:28 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 <1aci1mINNf28@agate.berkeley.edu>, ouster@sprite.Berkeley.EDU (John Ousterhout) writes:
|> There's no direct support for this in the "bind" command, but you can
|> do it with a Tcl script such as the following:
|> 
|> bind Text <Any-KeyPress> {key %W %A %s}
|> 
|> proc key {w char state} {
|>     if {$state & 4} return
|>     if {$char != ""} {
|>         $w insert insert $char
|> 	$w yview -pickplace insert
|>     }
|> }

Just fyi-- I've occasionally noticed weirdness with the BackSpace key of
the Risc System/6000, in particular I think with the straight Athena text
widget, it doesn't work.

Well, of course the above causes it to not work as well.  Instead of
deleting the previous character, it inserts `\x08'.  Anyway, here's the
kluge I used to get around it:

  bind Text <Any-KeyPress> {
	if {%s & 4} return
	if {"%K" == "BackSpace"} {
		tk_textBackspace %W
		%W yview -pickplace insert
	} else {
		if {"%A" != ""} {
        		%W insert insert "%A"
			%W yview -pickplace insert
 		}
	}
  }

If you've got a better way, lemme know.

-- 
: 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: larry@tweety.cs.berkeley.edu (Larry Rowe)
Newsgroups: comp.lang.tcl
Subject: Commercial use of Tcl/Tk in Computational Fluid Dynamics
Date: 29 Sep 1992 14:44:25 GMT
Organization: U.C. Berkeley EECS Dept.
Distribution: world
Reply-To: larry@cs.Berkeley.EDU
NNTP-Posting-Host: tweety.cs.berkeley.edu

Use of TCL/TK for Computational Fluid Dynamics Applications
Wayne A. Christopher
Pacific Marketing and Communication, Berkeley CA
September 28, 1992

P.M.A.C. is a small company that develops software for computational
fluid dynamics.  Our programs are used for generating meshes to
represent objects such as mechanical parts, which are used as input to
fluid flow solvers that typically run on supercomputers.

We have used TCL and TK for two products so far.  The first is a
"manager" or graphical shell that coordinates many other programs
that have different and often idiosyncratic interfaces, and presents a
unified view of the high-level data they manipulate.  This is a
natural task for TCL and TK, since it is very easy to add new programs
and options, and the simplicity of TCL makes it feasible to include
instructions for users to customize it for their own applications.

The second application is a grid and surface visualizer.  This allows
the user to view the grids generated by the system prior to the fluid
flow analysis step, and later, the results of the analysis.  The most
graphics-intensive section of the code, which involves calls to both X
and GL and must be able to store and render up to a million polyhedra,
was implemented as a special TK widget, but most of the other code,
including all user interface code, was written in TCL.

Newsgroups: comp.lang.tcl
From: shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall)
Subject: Re: Core dump when delete chars in text widget
Date: Thu, 01 Oct 1992 11:52:18 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 <1992Oct1.084817.15289@aragorn.unibe.ch>, haedener@iacrs1.unibe.ch (Konrad Haedener) writes:
|> In article <1992Sep29.161048.15547@awdprime.austin.ibm.com>, madere@julius.austin.ibm.com (Steve Madere) writes:
|> |> In article <1992Sep26.194123.24976@rchland.ibm.com>,
|> |> shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall) writes:
|> |> |> I've been getting core dumps when deleting characters in the text widget.
|> |> |> 
|> |> |> call stack is usually Rebalance, TkBTreeDeleteChars, tkText.DeleteChars().
|> |> |> 
|> |> |> codecenter tells me that on
|> |> |> 
|> |> |> tkTextBTree.c:722   nodePtr = line2Ptr->parentPtr;
|> |> |> 
[...]
|> |> |> I'm on AIX 3.2.2, x11r4.  Has anyone else seen this problem?
|> |> |> 
[...]
|> |> 
|> |> YES, I'VE HAD EXACTLY THE SAME PROBLEM!
|> 
|> I'm getting the same behaviour under 3.2.1/R4.
|> Setting 
|>   MALLOCTYPE=3.1
|>   export MALLOCTYPE
|> prior to invoking my tk based application makes the core dump phenomenon
|> disappear. Programs running well with version 3.1 malloc strategy and 
|> producing SIGSEGVs with MALLOCTYPE 3.2 are _always_ referencing freed
|> memory or corrumping malloc-internal structures or violating malloc rules

Unfortunately, tcl/tk has been compiled under 3.1.5. I.e. MALLOCTYPE=3.1
by default.  I've also tried compiling it under 3.2.2 and gotten the
error as well.

-- 
: 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: wecker@child.cxn.dec.com (Dave Wecker/IGOR)
Newsgroups: comp.lang.tcl
Subject: Can't get tk to work correctly with tvtwm
Date: 28 Sep 92 21:05:26 GMT
Organization: /usr/users/wecker/.organization

I'm having all sorts of trouble getting `tk' menus and popup windows to work
correctly with `tvtwm' (window manager with virtual screens). As long as I
keep the `tk' application on the base screen (1,1) everything works as
expected however, as soon as I move the window to another screen the fun
begins. Here is an example of what happens:

    1. Start the application on screen 1,1.
    2. Move it around on the screen (everything works).
    3. Move it to another screen (everything works).
    4. Move it around on the new screen (menus wind up at the far edge of
    	the screen, popups wind up back on screen 1,1)!!!!

The same behaviour can be observed if you just start up the application on any
screen other than 1,1 (immediately all menus are at the far edge and popups
are on 1,1). It appears that menus are sending absolute coordinates for their
positions, but are probably using PPosition Hints (so that tvtwm adds in the
current screen's virtual root position) sending them off the far edge.
Toplevel popups appear to be doing the exact opposite.

Am I doing something wrong, or is there a usable work around?
____________________________________________________________________________
dave                                      ENET:   HOOTUS::WECKER  WECKER@CXO
      Digital Equipment Corporation       PHONE:  719/548-2352 DTN: 522-2352
      CXO2-1/7-D    Pole: L95 Cube: 60    FAX:    719/548-3995 DTN: 522-3995
      301 Rockrimmon Blvd                 CRL:	  617/621-6699 DTN: 259-6699
      Colorado Springs CO 80919           ARPA:   wecker@hootus.enet.dec.com
        CRL & SME multimedia research     PROJS:  IGOR and DIDDLY

Disclaimer: The opinions expressed are my own and in no way should be taken
            as representative of my employer Digital Equipment Corporation.
____________________________________________________________________________

--
Best Regards,
____________________________________________________________________________
dave                                      ENET:   HOOTUS::WECKER  WECKER@CXO
      Digital Equipment Corporation       PHONE:  719/548-2352 DTN: 522-2352
      CXO2-1/7-D    Pole: L95 Cube: 60    FAX:    719/548-3995 DTN: 522-3995
      301 Rockrimmon Blvd                 CRL:	  617/621-6699 DTN: 259-6699
      Colorado Springs CO 80919           ARPA:   wecker@hootus.enet.dec.com
        CRL & SME multimedia research     PROJS:  IGOR and DIDDLY

Disclaimer: The opinions expressed are my own and in no way should be taken
            as representative of my employer Digital Equipment Corporation.
____________________________________________________________________________
From: ouster@sprite.Berkeley.EDU (John Ousterhout)
Newsgroups: comp.lang.tcl
Subject: Re: Cursor woes
Date: 30 Sep 1992 15:10:27 GMT
Organization: U.C. Berkeley Sprite Project
Distribution: world
NNTP-Posting-Host: tyranny.berkeley.edu

In article <1992Sep29.125721.21533@rchland.ibm.com>, shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall) writes:
|> How can I change the pointer to the watch cursor over the entire wish
|> window ?  When I do ``. configure -cursor watch'', I get
|> ``invalid command name "."''
|> 
|> For right now, I'm trying to side step the issue by having a frame child
|> which is the parent of everything else.  I then configure the frame to
|> have the new cursor.
|> 
|> However, whenever I change the cursor, my entire window shrinks, then
|> expands back to its original size.  While an interesting visual effect,
|> it is not really desired.
|> 
|> And of course, this doesn't work for the text widget, as they define their
|> own cursor.
|> 
|> Basically, what I'm looking for is some means of changing the cursor to a
|> watch over the entire app, then restoring the original cursor.
|> 
|> In Motif, I could XDefineCursor() over my toplevel widget for the watch,
|> then XUndefineCursor() and the cursors reverted to what they were before.
|> 
|> It seems that in Tk I cannot define a cursor over the entire app but must
|> set it over each widget individually, then restore them individiually as
|> well.
|> 
|> -- 
|> : jay          jay@vnet.ibm.com    My opinions and ideas, not my employer's.
|> : shmdgljd@rchland.vnet.ibm.com    (c) Copyright 1992.  All rights reserved.

The problem is that right now in wish the main window isn't a full-fledged
widget.  It should be, but it's just never gotten implemented.  However, it
probably wouldn't be hard at all for you to do this.  Or, you could just add
a new Tcl command of your own that calls "Tk_DefineCursor" to set (and unset)
the cursor for the main window.
Newsgroups: comp.lang.tcl
From: shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall)
Subject: Request for text xview command
Date: Mon, 05 Oct 1992 16:29:44 GMT
Reply-To: jay@vnet.ibm.com
Disclaimer: This posting represents the poster's views, not necessarily those of IBM
Organization: IBM Rochester, MN

I'd just like to add another request for a text widget xview command,
similar to what the contrib text widget has...

-- 
: 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,comp.windows.open-look,comp.sys.sun.apps,comp.windows.x
From: gandalf@Csli.Stanford.EDU (Juergen Wagner)
Subject: Re: OpenWindows and Tk - is there anything I can do?
Followup-To: comp.lang.tcl
Organization: Stanford University CSLI
Date: Fri, 2 Oct 1992 08:50:15 GMT

When I got Tcl/Tk for the first time (I think, this was version 2.1),
it lacked a mechanism for pointer/keyboard grabbing, so I went ahead
and implemented it (this was obsoleted a few versions later).

Everything seemed to wirk fine, except that sometimes mysterious X
errors popped up (like the one you have been getting). A few
experiments showed that apparently, the window I created and
immediately grabbed the mouse and keyboard for, didn't exist
immediately after its creation, i.e., its window id didn't seem to be
valid for the grab operation.

Inserting "after 200" solved the problem. As far as I can see, there
are four possible causes of this bug/undocumented feature:

[1] Tcl/Tk's X stuff needs a chance to execute some code after certain
operations (like window creation). Since Tcl?Tk is non-preemptive,
only a delay can accomplish this.

[2] There is a window manager problem. This must be a fairly general
problem because I obbserved it under both twm and mwm. Now you have
similar effects with OpenLook. Maybe the mapping of new windows
doesn't happen fast enough (this would also explain, why a delay helps
solve the problem).

[3] The X server has a bug. This seems to be unlikely (no kidding! :-)
because I get this behavior on all kind of servers (Sun, Dec, HP, MIT). 

[4] It's something else :-).

My favourite is [2], next comes [1]. Can anyone who has some more
insight into Xlib and Tcl/Tk (and more time) comment on this?

--Juergen Wagner

J_Wagner@iao.fhg.de
gandalf@csli.stanford.edu
From: jamensky@bnr.ca (Mark Jamensky)
Newsgroups: comp.lang.tcl
Subject: Re: .Xresources/.Xdefaults resource specifications
Date: 30 Sep 92 15:46:07 GMT
Reply-To: jamensky@bnr.ca (Mark Jamensky)
Organization: Bell-Northern Research Ltd.


  You can use the -name <appname> option to wish.  Then in your .Xresources
you would have the following:

<appname>*background:	black
<appname>*foreground:	white

  But here comes the strange part.  If the <appname> begins with a capital letter
it does not work!  Am I going crazy or have others encountered this problem?  I
must be doing something wrong, right?

-- 
Mark Jamensky  jamensky@bnr.ca  Bell-Northern Research  Ottawa  (613) 765-4942
Newsgroups: comp.lang.tcl