HDTenEightyP/NetNews huggingface dataset:
From: "David Herron" <david@twg.com>
Subject: Re: trapping null selections from a listbox
Sensitivity: Personal
Encoding:  22 TEXT , 4 TEXT 
Conversion: Prohibited
Organization: The Wollongong Group, Inc., Palo Alto, CA
Conversion-With-Loss: Prohibited
Date: Tue, 22 Dec 1992 17:53:34 GMT

> I need to know how I can trap a null selection from a listbox.  This is
> important in the app that I am building, as there is no default.  If the
> user doesn't make a selection from the list box, then I need to know so I 
> can flag the user with a dialog box.

If there's no selection then

	$top.l curselection

will return an empty list.  So what's the problem?

My idiom for this is:

	set sel [$top.l curselection]
	if {$sel == ""} {
		error "bitch about something.  automagically `return's
			and uses tkerror{} to present the complaint."
	}

	foreach s $sel {
		...process...
	}

<- David Herron <david@twg.com> (work) <david@davids.mmdf.com> (home)
<-
<- During the '80s Usenet's mantra was: "Not all the world's a VAX".
<- During the '90s I hope it becomes:   "Not all the world's DOS (ick)".
From: tromey@cns.caltech.edu (Tom Tromey)
Newsgroups: comp.lang.tcl
Subject: Oops (Was: Bind bug, Tk3.0)
Date: 23 Dec 92 14:33:50
Organization: California Institute of Technology
NNTP-Posting-Host: kant.cns.caltech.edu
In-reply-to: tromey@cns.caltech.edu's message of 23 Dec 92 14:14:25

Of course, that bind command should be:

bind .zot <q> exit

The script still fails however -- I just mistyped it when entering
into my posting buffer.

Tom
--
tromey@cns.caltech.edu
"In a riddle whose answer is chess, what is the only prohibited word?"
I thought a moment and replied, "The word chess".
	-- Jorge Luis Borges
Newsgroups: comp.lang.tcl
From: scs@iti.org (Steve Simmons)
Subject: Re: TCL3.0 installation lack
Organization: Industrial Technology Institute
Date: Mon, 21 Dec 1992 19:08:57 GMT

ouster@sprite.Berkeley.EDU (John Ousterhout) writes:

>In article <1992Dec21.031913.3384@lokkur.dexter.mi.us>, scs@lokkur.dexter.mi.us (Steve Simmons) writes:

>|> When doing `make install', neither tcl.h nor tk.h are installed.

>Oops, sorry.  What's the best place to install local header files?
>/usr/local/include?

That's where I'd put them, but opinions of others should be solicited.
-- 
	"You can't get here from here."
Newsgroups: comp.lang.tcl
From: Nathaniel Borenstein <nsb@thumper.bellcore.com>
Subject: Re: Tcl as a safe multimedia mail language (was Re: Insecurity of tk)
Organization: Bellcore
Date: Mon, 28 Dec 92 00:46:51 GMT

Excerpts from netnews.comp.lang.tcl: 25-Dec-92 Tcl as a safe multimedia
ma.. Karl Lehenbauer@NeoSoft. (1272)

> You can test some of your ideas with respect to Tcl as a safe multimedia
> mail language without resorting to C at all -- if you use "rename" and
> rename a command to "", it is effectively deleted from the interpreter.

True, but dangerous.  Before I would depend on this approach in a
production implementation, I would want to have a Tcl command that gave
me the names of all currently-defined Tcl commands.  I could then use an
"OK" list instead of a "DANGEROUS" list, which sounds like a much safer
approach.

> It would be nice if your support procs could read and write files and such,
> while procs embedded in mail, or whatever, could only access the restricted
> set.

Yeah, but this can get real tricky in the implementation.  For example,
one could imagine letting the user define procs which could use the more
powerful feature set and could in turn be called by mail procs, but this
effectively allows each user to redefine the language in idiosyncratic
and security-endangering ways, which I think would be a bad idea. --
Nathaniel
From: ouster@sprite.Berkeley.EDU (John Ousterhout)
Newsgroups: comp.lang.tcl
Subject: Re: Tk3.0 bug?
Date: 21 Dec 1992 19:37:29 GMT
Organization: U.C. Berkeley Sprite Project
Distribution: world
NNTP-Posting-Host: tyranny.berkeley.edu

In article <SLS.92Dec18163617@batcomputer.aero.org>, sls@aero.org (Sam Shen) writes:
|> This short script puts up a button and another toplevel window .hello.
|> The button alternately does a wm withraw .hello/wm deiconify .hello.
|> This works fine with tk2.3, but under tk3.0 the .hello window never
|> shows up.  I'm running on a sparc 2/SunOS 4.1.1/MIT X11R5.
|> 
|> 	-Sam
|> 
|> toplevel .hello
|> pack append .hello \
|>     [label .hello.l -text "Hello, world!"] ""
|> wm withdraw .hello
|> 
|> pack append . \
|>     [button .b] "fill expand"
|> 
|> proc Show {} {
|>     wm deiconify .hello
|>     .b config -text "Hide" -command Hide
|> }
|> 
|> proc Hide {} {
|>     wm withdraw .hello
|>     .b config -text "Show" -command Show
|> }
|> 
|> Show
|> 

Tk 3.0 appears to have broken the ability to start a window off
withdrawn and later deiconify it.  Here is a patch to tkWm.c that
should fix the problem.  Sorry about that...

*** /tmp/,RCSt1084779	Mon Dec 21 11:36:13 1992
--- tkWm.c	Mon Dec 21 11:30:53 1992
***************
*** 386,394 ****
      XTextProperty textProp;
      int savedX, savedY, savedFlags;
  
-     if (wmPtr->hints.initial_state == WithdrawnState) {
- 	return;
-     }
      if (wmPtr->flags & WM_NEVER_MAPPED) {
  	wmPtr->flags &= ~WM_NEVER_MAPPED;
  
--- 386,391 ----
***************
*** 433,438 ****
--- 430,438 ----
  	    }
  	}
      }
+     if (wmPtr->hints.initial_state == WithdrawnState) {
+ 	return;
+     }
      wmPtr->flags |= WM_ABOUT_TO_MAP;
      UpdateGeometryInfo((ClientData) winPtr);
      wmPtr->flags &= ~WM_ABOUT_TO_MAP;
Newsgroups: comp.lang.tcl
From: "David Herron" <david@twg.com>
Subject: Re: Tcl 6.4 Tcl_ParseVar bug OR gcc 2.2.2 bug?
Sensitivity: Personal
Encoding:  18 TEXT , 4 TEXT 
Conversion: Prohibited
Organization: The Wollongong Group, Inc., Palo Alto, CA
Conversion-With-Loss: Prohibited
Date: Thu, 31 Dec 1992 23:47:01 GMT

> |> In my opinion, Tcl should reallocate new space for its input and
> |> manipulate that. With the use of gcc (and other ANSI conformant)
> |> compilers becoming more widespread, ...

..
> Ultimately I should fix Tcl, but this probably isn't going to happen
> for version 7.0.

Okay so since there's a bit of time to think about this problem ..

Tcl shouldn't *always* realloc its input &c.  Every time I've studied the
performance of something, malloc() & friends turned out to be quite expensive
and something to avoid when not necessary.  This proposal to strdup() all the
time may be big a problem.

Some tricks might/could be pulled though since `most' command strings
are short it'd be safe to allocate on the stack.  (At least on virtual-memory
systems anyway).

<- David Herron <david@twg.com> (work) <david@davids.mmdf.com> (home)
<-
<- "Unix is a great idea being sold by companies who couldn't sell
<- fast food in Somalia." - bill davidsen <davidsen@ariel.crd.GE.COM>
Newsgroups: comp.lang.tcl
From: markd@NeoSoft.com (Mark Diekhans)
Subject: Extended Tcl for Tcl 6.5 and Tk 3.0 available
Organization: NeoSoft Communications Services -- (713) 684-5900
Date: Tue, 22 Dec 1992 01:25:41 GMT


A version of Extended Tcl compatible with Tcl 6.5 and Tk 3.0 is now available
via anonymous ftp:

   sprite.berkeley.edu: /tcl/tclX6.5c.tar.Z

It is not yet available from barkley.berkeley.edu.

This version also fixes several minor bugs and adds some minor features.

Extended Tcl is an add-on package to Tcl 6.5 and optional Tk 3.0 that adds
many features that are useful for systems programming tasks, large project
development and multi-process programming.

If you have any questions, suggestions or bugs please contact:

    tcl-project@NeoSoft.com

Mark
Newsgroups: comp.lang.tcl
From: news@choreo.ca (Choreo NetNews Administration Account(Ottawa))
Subject: re: making a listbox wider
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, 29 Dec 1992 20:06:48 GMT

I read earlier today that David Herron suggested using a vairable to store
the length of the strings, and to use the maximum as the width for a gemorty
statement.

OK, so I have this on the line where I create the listbox

	-geometry $maxlenx10

but tcl complains that it can't read $maxlenx10.  How I tell tcl that
$maxlen is the name of the variable?  Is there a construct similar to
${name} in the shell?

Thanks!
Newsgroups: comp.lang.tcl
From: news@choreo.ca (Choreo NetNews Administration Account(Ottawa))
Subject: making a listbox wider
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, 22 Dec 1992 14:36:45 GMT


How can I make a listbox wider?  Using horizontal scrollbars to get at the
last 5 or 6 chars in the text doesn't seem worth it.  (Besides, the customer
wants all of the text visible.)

Thanks.

Chris 
chare@choreo.ca

Newsgroups: comp.lang.tcl
From: jlieb@is.morgan.com (Jerry Liebelson)
Subject: Keeping a col/row fixed while scrolling horiz/vertically
Organization: Morgan Stanley & Company, Inc.
Date: Tue, 29 Dec 1992 23:32:05 GMT

I'm just getting started with Tcl/Tk and wonder if anyone can comment on the
feasibility of doing the following:

I want to create a scrolling table where the leftmost column and topmost
row serve as "semi-fixed" row and column headings, respectively.
(This kind of functionality is found in some spreadsheets such as Wingz.)

To illustrate:

  CHn = column heading n
  RHn = row heading n
  dxy = Data at row x, col y



    XX   CH1  CH2  CH3       scroll                 XX   CH2  CH3  CH4
    RH1  d11  d12  d13       horizontally           RH1  d12  d13  d14
    RH2  d21  d22  d23       --------------->       RH2  d22  d23  d24
    RH3  d31  d32  d33                              RH3  d32  d33  d34
    RH4  d41  d42  d43                              RH4  d42  d43  d44
    RH5  d51  d52  d53                              RH5  d52  d53  d54

             |  scroll
             |  vertically                      (column with RH's stays fixed)
             |
             |
             V

    XX   CH1  CH2  CH3
    RH2  d21  d22  d23     (row with CH's stays fixed)
    RH3  d31  d32  d33
    RH4  d41  d42  d43
    RH5  d51  d52  d53
    RH6  d61  d62  d63

Apart from having to write and incorporate a special purpose widget, is
there a way to emulate this somehow under the current version of Tcl/Tk?


-- 
Jerry Liebelson
jlieb@is.morgan.com
Compuserve: 73477,2740
Newsgroups: comp.lang.pascal
From: trodgers@nmsu.edu (Thomas Rodgers)
Subject: Re: Distributing TPUs
Organization: NMSU Computer Science
	<765338d8368876t211@witsend.uucp> <dmurdoch.254.725594757@mast.queensu.ca>
	<1992Dec29.163745.19275@nmsu.edu> <1992Dec31.121645.6747@qiclab.scn.rain.com>
Date: Sat, 2 Jan 1993 02:54:51 GMT

>Well, TPU files have a *big* advantage over OBJ and LIB files in one
>area. If I only use *one* function or procedure from a TPU, only the
>code required for *that* is incorporated in the final ESE. Ditto
>for constants defined in the TPU.  Only the ones that get *used* are 
>incorporated.

Where did you get the idea that dead code elimination was an exclusive
'feature' of Turbo Pascal?  There are other compiler products that
have been doing it for longer than TP without using TPU's.  TPU's may be
a more convenient vehicle for accomplishing it, but the point is
moot, since Borland has achieved the same thing with BC++ as well, 
without the use of TPU's.  I would suspect the reason Borland doesn't 
change, is that they recycle vast amounts of compiler code between 
successive versions of their product, and that this code is heavily 
dependant on interacting with TPU's and not with .OBJ's. Another 
consideration might be Borland's "Fastest Compiler" claim to fame and 
marketing gimick, the proprietary TPU format undoubtedly gives them a 
speed boost.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
trodgers@nmsu.edu     In Real Life ???

                     ---------------------------
    "Bob's" promise is to widen the scope and nature of *abnormal 
behavior*, to explore NEW WAYS of going over the edge *and coming
back*.  PLUS to *bring back those who couldn't on their own*...to
help you create the HIGHEST POSSIBLE EARNINGS from the PSYCHODYNAMICS
of ABNORMALITY...to turn Conspiracy-implanted personality disorders
into an ILLUSION OF CREATIVITY that will *fool normals* and GET YOU
SEX!
--
  Excerpted from an online pamphlet for the Church Of The SubGenius
From: enge@almaden.ibm.com
Date: Sun, 3 Jan 93 15:57:26 PST
Newsgroups: comp.lang.pascal
Subject: Binary Editor
News-Software: UReply 3.1

Is there a fix for the Turbo Pascal Editor Toolbox for protected mode?
Seem to be a lot of protected mode violations in that program.

Roy

Newsgroups: comp.lang.pascal
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: 64K segments
Organization: Queen's University
Date: Tue, 22 Dec 1992 22:52:16 GMT

In article <1992Dec22.195752.6805@purelogic.cs.uwlax.edu> butte_ms@serine.uwlax.edu (Mike S. Butterbrodt S92) writes:
>Probably a FAQ.   Was mentioned not long ago that there are way (painfull or  
>otherwise) to get around the 64K segment limit in BP 7.0.  Ok, so how.  I would  
>appreciate a few tips on this most annoying feature of an otherwise nifty  
>language.

The same as in previous versions:  if you want a total allocation that's 
bigger than 64K, break it up into pieces that are smaller than 64K.  For 
example, for a 100 x 100 array of Doubles (80000 bytes, too big), use an
array of 100 pointers to arrays of 100 doubles (400 bytes for the pointers, 
800 bytes for each array).

The advantage under BP 7 is that in protected mode the heap will be much 
bigger; 1000 x 1000 arrays might be feasible.  This would be on a machine 
with lots of ram, or under a DPMI server (like Windows or QDPMI, but not 
the one bundled with BP 7) that offers virtual memory.  I haven't tried 
pushing the allocation limits; you might well run out of some other resource 
before you hit the RAM limit.  For instance, there's a system wide limit of 
8192 selectors; 1000 large allocations would make a significant dent in that.

Duncan Murdoch
dmurdoch@mast.queensu.ca
From: matte@plutonium.CChem.Berkeley.EDU (Matt Rose)
Newsgroups: comp.lang.pascal
Subject: Calling DLL Procs via pointer.
Date: 23 Dec 1992 00:58:02 GMT
Organization: University of California, Berkeley
Distribution: usa
NNTP-Posting-Host: plutonium.cchem.berkeley.edu
Keywords: Pascal DLL Assembly


I've been using MS-Windows for awhile now, via BC++, and BP, and
I'm getting used to it, and even liking it sometimes.  But I seem 
to have come across what I would consider a shortcoming of Pascal.

I want an Object that will call procedures from a DLL that is specified
during run time.  The code in C would look something like this:

hLibrary = LoadLibrary('Library_Name');
pDLLFunc = GetProcAddress(hLibrary, 'FuncName');

Then later on I excecute by calling:

  (*pDLLFunc)(paramList);

Borland C requires type checking on the parameter list that is achieved
by forcing you to declare a pointer to function that returns TYPE, and
takes paramters of TYPE and TYPE.  The strict type checking follows in
the way of Pascal.

Except that the BP manuals tell me there is no provision for making a
call to a procedure that I have a pointer to.  It appears that I have
to go to assembly language! If this is the case I can do it, but I
have to spend my valuble (ha ha) time learning assembly, and how to pop
and push stacks and the like.  Geez, I'm an engineer not a programmer! :)
 
I find the LoadLibrary very useful for defining drivers and the like
for equipment, and not forcing me to decide on the equipment until I'm
running the programs.

Questions:
Why does Borland Pascal not include a provision for making a function call
from a pointer to the function?
When will they provide this feature?
Is there any other way I can call procedures from a library that won't
be written until after the main program is finished?
Has anyone coded an object in C, and then declared an instance of said
Almost liking MS Windows, despite my dislike for a man who would make
$Billions off DOS.

-matt
From: tcscs!zeta@src.honeywell.com (Gregory Youngblood)
Newsgroups: comp.lang.pascal
Subject: BOOT source wanted
Date: Tue, 29 Dec 92 09:07:10 CST
Reply-To: zeta%tcscs@src.honeywell.com
Organization: TCS Consulting Services

A while back someone had posted a mini program that could reboot the machine
and it had two constants, COLD and WARM and depending on which constant was
used, that type of boot would be achieved.

I thought I had it on my sytem, but a search of my harddrive and of my archive
floppies failed to turn anything up.

If someone out there has this source, I'd really appreciate it if you could
mail it to me.  I have recently come across a need to have it at work, and
I don't have it any longer.

thanks in advance.
Greg

.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.
.   TCS Consulting Services   P.O. Box 600008   St. Paul, MN  55106-0008    .
.   ..!srcsip!tcscs!zeta                 ..!src.honeywell.com!tcscs!zeta    .
.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.
Newsgroups: comp.lang.pascal
From: samodena@csemail.cropsci.ncsu.edu (S. A. Modena)
Subject: Re: BP 7.0 and qemm6.02
Organization: Crop Science Dept., NCSU, Raleigh, NC 27695-7620
Date: Wed, 30 Dec 1992 14:50:16 GMT

In article <29DEC199213113041@cc.utah.edu> msfuller@cc.utah.edu (MARC S. FULLER) writes:
>Does anyone have experience running BP 7.0 while using QEMM?  Recently I 
>received exception errors 12 or 13 while trying to start BP7.0.  I traced it 
>down to a noems switch I had put in the qemm statement in the config.sys file.  
>I did this to save the 64k expanded memory  base page in upper memory since I
>had no need of expanded memory functions.  BP7.0  is a protected mode compiler, 
>so why should it care about expanded memory?
>

The equivalent under DOS drivers is DEVICE=EMM386.sys ....which also
causes strange bugs while debugging.

The answer is simple: configure QEMM to forbid from loading it's
equilvalent to EMM386.sys.  

I'm no expert, but by definition, a protected mode app definitely isn't
interested in expanded memory, EXCEPT to know whether it exists, where it
is, whether the app setting it up and using it is well behaved and playing
by the rules.  I believe (and am willing to be contradicted by a more
knowledgable person) that if the EXPANDED memory driver does not watch it's
P's and Q's, it will destroy other residents of extended memory.

Hence exception 13.  :^)

Steve
---
+------------------------------------------------------------------+
|     In person:  Steve Modena     AB4EL                           |
|     On phone:   (919) 515-5328                                   |
|     At e-mail:  nmodena@unity.ncsu.edu                           | 
|                 samodena@csemail.cropsci.ncsu.edu                |
|                 [ either email address is read each day ]        |
|     By snail:   Crop Sci Dept, Box 7620, NCSU, Raleigh, NC 27695 |
+------------------------------------------------------------------+
         Lighten UP!  It's just a computer doing that to you.    (c)
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
From: gauderer@t524i3.ira.uka.de (Patric Gauderer)
Newsgroups: comp.lang.pascal
Subject: jpeg picture compression/decompression source code wanted
Date: 21 Dec 92 14:37:46
Organization: /usr/users_2/gauderer/.organization
Distribution: comp
NNTP-Posting-Host: t524i3.telematik.informatik.uni-karlsruhe.de

Hello 
I am searching for a jpeg picture compression/decompression 
source code in Turbo-Pascal.

thanx in advance

Patric
------------------------------------------------------------------------
Patric Gauderer      
e-mail : gauderer@telematik.informatik.uni-karlsruhe.de
------------------------------------------------------------------------
From: lsheppar@cc.brynmawr.edu ( Sheppard Leah C)
Newsgroups: comp.lang.pascal
Subject:  porting from VMS to UNIX
Date: 23 Dec 92 14:07:50 GMT

Pascal afficianados,

I am porting a rather lengthy automated operator scheduler program
from a VAX8350 to a Sun SPARCstation.  What should I know about the
different nuances in VAX/VMS Pascal and Pascal on the UNIX machine
...especially regarding records?
Looking for advice.  Please send responses directly to me.

Leah Sheppard
Bryn Mawr College Academic Computing
lsheppar@cc.brynmawr.edu
Newsgroups: comp.lang.pascal
Subject: Re: REQUEST: novell interrupt
From: cscmd@lux.latrobe.edu.au (Mitch Davis)
Date: Wed, 30 Dec 1992 13:48:33 GMT
Organization: La Trobe University
Keywords: novell interrupt login_name

In article <ppollet.71.724431645@cismibm.univ-lyon1.fr> ppollet@cismibm.univ-lyon1.fr (Patrick POLLET) writes:
>>Keywords: novell interrupt login_name 
>
>>Can anybody help me finding the interrupt for getting 
>>a novell current user_name and the current station adress ?? 
>
>go ftp anonymous to garbo.uwasa.fi 
>  in dir /pub/turbopas there are files tp6nov.zip and novpas.zip  that 
>implement most of the Novell API (no source provided but TPU units) 
>check also in the pub/comm dir there some some useful Novell goodies

Hi there folks.  I tried this FTP with no luck.  I eventually found
tp6nov.zip on syr.edu in /novell/tplib.

Mitch.
From: bobbe@vice.ICO.TEK.COM (Robert Beauchaine)
Newsgroups: comp.lang.pascal
Subject: Re: Turbo Vision Keys?
Date: 22 Dec 92 20:27:21 GMT
Organization: Tektronix, Inc., Beaverton,  OR.

In article <1992Dec22.003317.26213@monu6.cc.monash.edu.au> wigs@yoyo.cc.monash.edu.au (Aaron Wigley) writes:
>
>Solution - get the run time library, and modify the HandleEvent code in
>TDialog so that it does what you want. Better still, have a global
>variable in the application whether the program is CUA compliant, and
>have the user be able to toggle it.
>

  Or best yet, use object oriented design the way it was
  intended.  Define a TDialog descendent, then override the HandleEvent
  procedure to turn TABS into CR's and vice versa.

  If an object library is created properly (and Borland has done a
  pretty good job), you should never need the source code to extend
  an object to do what you want.  That's part of the whole point of
  OO programming.


/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ 

Bob Beauchaine bobbe@vice.ICO.TEK.COM 

C: The language that combines the power of assembly language with the 
   flexibility of assembly language.

Real friends don't let friends use UNIX.
Newsgroups: comp.lang.pascal