HDTenEightyP/NetNews huggingface dataset:
From: ouster@sprite.Berkeley.EDU (John Ousterhout)
Newsgroups: comp.lang.tcl
Subject: Re: Inter-Canvas Operations
Date: 13 Aug 1992 17:33:08 GMT
Organization: U.C. Berkeley Sprite Project
Distribution: world
NNTP-Posting-Host: tyranny.berkeley.edu

In article <2624@tivoli.UUCP>, carey@alta.tivoli.com (Carey Jung) writes:
|> 
|> Can anyone tell me if tk supports common operations between canvases and, in
|> particular, between canvases in top-level windows.  For example, is it possible
|> to drag and drop items from one canvas to another in two different top-level
|> windows?  Thanks.
|> 
|> -carey
|>   Carey Jung                 Tivoli Systems                 carey@tivoli.com
|> 		     ...!uunet!cs.utexas.edu!tivoli!carey

There is no built-in support for this, but you should be able to write
Tcl scripts that copy objects between canvases in different applications.
Doing a real drag-and-drop interface would probably be a lot more work.
Newsgroups: comp.lang.tcl
From: "David Herron" <david@twg.com>
Subject: Object orientedness & The Customer (tm)
Sensitivity: Personal
Encoding:  48 TEXT , 4 TEXT 
Conversion: Prohibited
Organization: The Wollongong Group, Inc., Palo Alto, CA
Conversion-With-Loss: Prohibited
Date: Tue, 18 Aug 1992 17:10:23 GMT

The recent discussion about the limitations of TCL have been interesting.
I've got to agree with most of the points.  From an engineering perspective
that is.

However my point of view is not one which looks on this as a research
proposition.  Instead the concern is to make applications where the
customer is not limited by the vision of the people selling the
software.  Or, as Sean said yesterday, to raise the least common
denominator of software.

But whatever I do with it must be usable by some version of the
stereotypical End User.  After all, we survive here on what we sell,
not on how many papers we write ;-).

As an engineer the comments about how an `object' paradigm to programming
helps to control complexity are right on the mark.  It puts into focus
some of the problems I've had with my own TCL applications.  So far I've
been solving these with careful modularization of data & procedures,
but there's only so far that can go.

..BUT...

If one is trying to sell an application with an embedded configuration/extension
language built in, you have to expect The Customer to play with it.  Not
all will, but some will.  And the more who do play with it (to an extent)
the better.  Having an embedded extension language does not limit my responsibility
for creating a good application, but regardless of how good a job an engineering
team does it cannot predict all the things the customer will want to do with
the software they build.  So it is a win/win situation to write the front end
using an interpreted language and let the end user be able to see and play
with the front end if s/he wishes.

For this to be of any aid to The Customer they must be able to understand
whatever language we choose to use.  Throwing an Object and Class paradigm
into the language seems to raise the amount s/he must learn before being
able to play with the applications front end.  But that's just `intuition'
and some user-factors research might prove me wrong.  Especially if it was
presented well with something to make the class structure obvious.

I'm open to persuasion here ...


BTW, I have to agree with most of Sean's comments.  TCL/TK has been a breeze
to work with and I am 100% sold on interactively and iteratively building
the front end to applications.  Now to sell the rest of my group ;-).  Or
maybe find a job somewhere that a new project is starting and they appreciate
the value of the things I've touched on up there ... ;-)


<- David Herron <david@twg.com> (work) <david@davids.mmdf.com> (home)
<-
<- "Just because I recreate the middle ages on weekends doesn't mean I have to
<- at work." -- me
From: ouster@sprite.Berkeley.EDU (John Ousterhout)
Newsgroups: comp.lang.tcl
Subject: Re: Question on binding
Date: 17 Aug 1992 15:32:12 GMT
Organization: U.C. Berkeley Sprite Project
Distribution: world
NNTP-Posting-Host: tyranny.berkeley.edu
Keywords: binding

Subject: Re: Question on binding
Keywords: binding

In article <1992Aug14.201600.26716@bnr.ca>, tewei@bnr.ca (Te-Wei Sun) writes:
|> 
|> Hi,
|> 
|> I wrote a short script in tk trying to bind several mouse events for
|> canvas. The goal I am trying to achieve here is as follows:
|> 
|> If I click button 1 once on the canvas, I would like to see the message
|> "b1 pressed once".
|> 
|> If I double click button 1 on the canvas, I would like to see ONLY the
|> message "b1 pressed twice", not "b1 pressed once" and "b1 pressed twice",
|> The same applied for triple click.
|> 
|> If I click button 1 on the rectangle widget, I would like to see ONLY the
|> message "b1 pressed once on rectangle", not "b1 pressed once" and "b1 pressed once on rectangle".
|> 
|> If I double click button 1 on the rectangle widget, I would like to see ONLY
|> the message "b1 pressed twice on rectangle" and so on for triple click.
|> 
|> 
|> Is there any way I can achieve the way I would like to have my bindings?
|> 

There are a couple of things to realize here.  First bindings on widgets
(e.g. "bind .c <1> ...") are independent of bindings on individual items or
tags within canvases (e.g. ".c bind 2 <1> ...").  If you set up a binding on
a rectangle within a canvas and also a separate binding on the canvas, both
will trigger when you click with the mouse in the rectangle.  It sounds like
you want a way to distinguish between a click over an item and a click when
the mouse isn't over any item.  You can distinguish these by checking to see
if there is a "current" item.  If the command ".c find withtag current"
returns an empty string then the mouse isn't over an item.  You can use this
in the binding for the whole canvas to do nothing when there is a current
item.

Second, you will always get a single-click event before a double-click event.
The reason for this is that at the time of the single-click event there's no
way to know whether or not a second click is going to follow, so Tk always
issues the single-click event.  If you don't want to process the single-click
in cases where there is (eventually) a double click, then use the "after"
command in your single-click event handler to delay the real work you want
to do for a while.  If a double-click event follows in the interim, then
you can cancel the real work.  This has the disadvantage of introducing a
delay in processing single clicks, but I don't see any alternative, given
your desires.
Newsgroups: comp.lang.tcl
From: richard@borneo.gmd.de (Richard Czech)
Subject: bind: How to select using Button-3
Reply-To: richard@borneo.gmd.de
Organization: GMD, German National Research Center for Computer Science
Date: Tue, 18 Aug 1992 12:34:00 GMT


Hi!

I have a Tcl/Tk application in which I want to have different bindings
for Button-1 and Button-3 in several listboxes as follows:

  ButtonPress-1:	select the element in the listbox
  ButtonRelease-1:	perform action 1

  ButtonPress-3:	select the element in the listbox
  ButtonRelease-3:	perform action 2

It works fine for Button-1, because the selection of elements in
listboxes is predefined for Button-1. The manual page for listbox
says:

  DEFAULT BINDINGS
     Tk automatically creates class bindings for  listboxes  that
     give them the following default behavior: 

     [1]
          When  button  1  is pressed over a listbox, the element
          underneath the mouse cursor is selected.  The mouse can
          be dragged to select a range of elements.


But how is this done? Can I define the same functionality for
Button-3 using the bind command?

----------------------------------------------------------------------
        Richard Czech                        e-mail:      czech@gmd.de
         GMD-I5-FIT
        P.O.Box 13 16                        phone: (+49) 2241 14 2039
D-5205 St. Augustin 1, Germany               fax:   (+49) 2241 14 2342
----------------------------------------------------------------------
From: carey@alta.tivoli.com (Carey Jung)
Newsgroups: comp.lang.tcl
Subject: Inter-Canvas Operations
Date: 13 Aug 92 04:48:15 GMT
Organization: TIVOLI Systems


Can anyone tell me if tk supports common operations between canvases and, in
particular, between canvases in top-level windows.  For example, is it possible
to drag and drop items from one canvas to another in two different top-level
windows?  Thanks.

-carey
  Carey Jung                 Tivoli Systems                 carey@tivoli.com
		     ...!uunet!cs.utexas.edu!tivoli!carey
From: adrianho@barkley.berkeley.edu (Adrian J Ho)
Newsgroups: comp.lang.tcl
Subject: Re: What are the new features of tk2.2?  - Where is it?
Date: 14 Aug 92 18:21:52
Organization: University of California, Berkeley
NNTP-Posting-Host: barkley.berkeley.edu
In-reply-to: stiles@rdd.lmsc.lockheed.com's message of Fri, 14 Aug 92 19:36:02 GMT

In article <1992Aug14.193602.13889@enterprise.rdd.lmsc.lockheed.com> stiles@rdd.lmsc.lockheed.com (Randy Stiles) writes:
>I have been exploring tk2.1, which I downloaded from barkley.berkley.

If you did, one of two things happened:

(1) You're hallucinating.  8-)
(2) You cracked root.  8-(

The RealDistribution is at:

	sprite.berkeley.edu:/tcl/tk2.2.tar.Z	[128.32.150.27]

This site only contains user-contributed stuff -- the official stuff
is at sprite.
--
-----------------------------------------------------------------------------
Adrian Ho, He With The Embarrassingly *Dead* Passion ** Phone: (510) 642-5563
System Manager, CFD Lab, ME Dept, UC Berkeley * adrianho@barkley.berkeley.edu
Maintainer, Tcl/Tk Contrib Archive ---- barkley.berkeley.edu [128.32.142.237]
  Send all Tcl/Tk Archive-related stuff to tcl-archive@barkley.berkeley.edu
From: gah@att.com (George A. Howlett)
Newsgroups: comp.lang.tcl
Subject: Re: canvas problem
Date: 19 Aug 92 18:21:10 GMT
Reply-To: george.howlett@att.com
Organization: AT&T Bell Laboratories
X-Newsreader: Tin 1.1 PL5

Chris Phillips  (214) 754-6419 (cgp@Arco.COM) wrote:
: For some reason the following script doesn't give the expected results.
: It creates two canvases: one horizontal and one vertical.  They should
: each create 10 squares, all in a row.  The horizontal canvas is ok, but
: only 2 squares show up in the vertical canvas.
: 
: 
: #!/usr/local/bin/wish -f
: 
: proc trash {w doy} {
:         toplevel $w
:         if {$doy == 1} {
:                 canvas $w.c -width 1c -height 10c
:                 $w.c create rectangle 0 0 1c 10c -fill red
:                 for {set j 1} {$j <= 10} {incr j} {
:                         $w.c create rectangle \
:                           0 [expr $j-1]c 1c ${j}c \
:                           -outline black -fill blue
:                 }
:         } else {
:                 canvas $w.c -width 10c -height 1c
:                 $w.c create rectangle 0 0 10c 1c -fill red
:                 for {set i 1} {$i <= 10} {incr i} {
:                         $w.c create rectangle \
:                           [expr $i-1]c 0 ${i}c 1c \
:                           -outline black -fill blue
:                 }
:         }
: 
:         pack append $w $w.c {expand fill}
: }
: 
: trash .t0 0
: trash .t1 1
: message .m -text "Horizontal: 10 blue squares\nVertical: 2 blue squares" \
:   -aspect 1500 -justify center
: pack append . .m {expand fill}
: 
: 
: ----- End script -----
: 
: 
: Any ideas?
: 
: Chris

In case you haven't already received the fix...

--gah

*** tkCanvas.c-dist	Sat Aug  8 21:11:42 1992
--- tkCanvas.c	Wed Aug 19 13:57:39 1992
***************
*** 1546,1552 ****
      screenX1 = canvasPtr->xOrigin;
      screenY1 = canvasPtr->yOrigin;
      screenX2 = screenX1 + Tk_Width(tkwin);
!     screenY2 = screenY1 + Tk_Width(tkwin);
      if (canvasPtr->redrawX1 > screenX1) {
  	screenX1 = canvasPtr->redrawX1;
      }
--- 1546,1552 ----
      screenX1 = canvasPtr->xOrigin;
      screenY1 = canvasPtr->yOrigin;
      screenX2 = screenX1 + Tk_Width(tkwin);
!     screenY2 = screenY1 + Tk_Height(tkwin);
      if (canvasPtr->redrawX1 > screenX1) {
  	screenX1 = canvasPtr->redrawX1;
      }
From: tmb@arolla.idiap.ch (Thomas M. Breuel)
Newsgroups: comp.lang.tcl
Subject: Re: why Tk doesn't scale well
Date: 13 Aug 92 14:29:03 GMT
Reply-To: tmb@idiap.ch
Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
	Perceptive)
In-reply-to: connolly@convex.com's message of 13 Aug 92 01:22:11 GMT

In article <1992Aug13.012211.10452@news.eng.convex.com> connolly@convex.com (Dan Connolly) writes:

   Tcl VS SMALLTALK

   I think the programming model proposed by SmallTalk is the clear choice
   for visual interface design.

I'm not so sure about that...

   [...] All but the last two have a full class system with inheritance and
   subclassing supported by the language. It's possible (though painful) to
   subclass Xt widgets to add state or messages. The Tk toolkit allows
   class bindings to enhance the messages understood by a class, but it has
   no mechanism for adding state to an interface object.

   For example, suppose I wanted to mimic an emacs buffer with a Tcl text
   widget. In an OOP language, I could subclass the text widget, add
   instance variables for things like the filename, editing mode, "dirty
   bit", etc. In Tcl I have to cook up some method to associate this
   state with the text widget.

Well, there are alternative, tried approaches to reuse of UI
components that do not require inheritance. For example, you can
filter the messages that go to the text widget (closely related:
wrapping). 

Why would you choose such an alternative approach? First, it goes well
with a thread/process model. Second, it reduces the risk that you
accidentally come to depend on some property of the text widget that
is visible only by descendants. In fact, I would argue that OOP for UI
programming is an inferior implementation of such an approach...

   I wish Tk were built on top of XLisp -- then we'd have efficient
   recursive list processing and an object system.

There are many X window interfaces based on Lisp (some even on XLisp).
Why don't you use them? If that's what you like, what is it about Tk
that makes you wish that it were built on top of XLisp?

Tk and TCL seem to me to be very reasonable compromises for living in
the C/X11/networked world. I would hope that Tk ultimately also will
explicitly support and encourage UI programming based on a
multi-threaded environment; "send" is a first step. That could give
you the flexibility of a message-passing approach to user interfaces
with the simplicity of the Tk/TCL substrate.

					Thomas.
Newsgroups: comp.lang.tcl
From: cgp@Arco.COM (Chris Phillips  (214) 754-6419)
Subject: canvas problem
Organization: ARCO Oil and Gas Company
Date: Tue, 18 Aug 1992 02:38:04 GMT

For some reason the following script doesn't give the expected results.
It creates two canvases: one horizontal and one vertical.  They should
each create 10 squares, all in a row.  The horizontal canvas is ok, but
only 2 squares show up in the vertical canvas.


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

proc trash {w doy} {
        toplevel $w
        if {$doy == 1} {
                canvas $w.c -width 1c -height 10c
                $w.c create rectangle 0 0 1c 10c -fill red
                for {set j 1} {$j <= 10} {incr j} {
                        $w.c create rectangle \
                          0 [expr $j-1]c 1c ${j}c \
                          -outline black -fill blue
                }
        } else {
                canvas $w.c -width 10c -height 1c
                $w.c create rectangle 0 0 10c 1c -fill red
                for {set i 1} {$i <= 10} {incr i} {
                        $w.c create rectangle \
                          [expr $i-1]c 0 ${i}c 1c \
                          -outline black -fill blue
                }
        }

        pack append $w $w.c {expand fill}
}

trash .t0 0
trash .t1 1
message .m -text "Horizontal: 10 blue squares\nVertical: 2 blue squares" \
  -aspect 1500 -justify center
pack append . .m {expand fill}


----- End script -----


Any ideas?

Chris
From: snl+@cs.cmu.edu (Sean Levy)
Newsgroups: comp.lang.tcl
Subject: BOS 1.31 release
Date: 12 Aug 92 07:53:21 GMT
Article-I.D.: cs.seWHDle00hNS4Za1ti
Organization: Carnegie Mellon, Pittsburgh, PA

I've released a new version of BOS; this is not a major release, just a
rev of V1, so it is mainly bug fixes and some enhancements. There is a
gdbm-based object storage module, functions that turn objects into
bytestreams and parse objects out of bytestreams for transmitting and
storing objects (used by the gdbm thingie) and some other stuff. The man
pages are a bit out of date and the Makefiles probably won't work out of
the box, but they are parameterized enough so that you can just set a
few macros and (hopefully) go. Still no really good example code, sorry.

Just in case anyone is interested...

It's been uploaded to barkley and is also available on sambar
(128.2.214.236) under /afs/cs/user/snl/public/bos-1.31.tar.Z.

There *is* ongoing development of this package, which is actually
picking up now that I have more programmers on the project.

Peace,
			-- Sean
--
Sean Levy, n-dim Group, EDRC, CMU, 5000 Forbes Ave, PGH, PA 15213
Email: snl+@cmu.edu, Phone: +1 412 268 5221, Fax: +1 412 268 5229
Newsgroups: comp.lang.tcl
From: axel@cs.tu-berlin.de (Axel Mahler)
Subject: Re: How to raise window to become top-layer?
Organization: /home/stone/axel/.organization
Date: Wed, 19 Aug 1992 21:25:40 GMT

In article <16tqqhINNhf0@agate.berkeley.edu> ouster@sprite.Berkeley.EDU (John Ousterhout) writes:
   In article <1992Aug19.010804.16684@twg.com>, david@twg.com (David Herron) writes:
   |> 
   |> Why does tk not have things like `wm raise' and `wm lower'??

   There's no good reason for this.  It's on my (semi-infinite) list of things
   to do.

On a related issue: is there any way to re-map a window that has 
been withdrawn with "wm withdraw <windowid>" ? 

The only way I came up with until now is to destroy a window, and
completely rebuild it when it's needed again. We are developing
some fairly heavyweight application windows, so that rebuilding
them each time we want them on the screen, appears to be rather 
wasteful.

Cheers, Axel.
--
===============================================================================
Axel Mahler, Tech.Univ. Berlin
E-Mail: axel@cs.tu-berlin.de (axel@db0tui62.bitnet)
Voice: +49-30-314-73487
From: sjmadsen@miavx1.acs.muohio.edu (Steve Madsen)
Newsgroups: comp.lang.pascal
Subject: Re: Updating
Date: 21 Aug 92 07:29:54 GMT
Article-I.D.: miavx1.1992Aug21.122955.12207
Organization: Miami of Ohio

>>> Wouldn't Seek(EOF) work just as well, and read more clearly?
>>        EOF returns a boolean value, so I'd say no...
> 
> I was CLOSE!  What I meant to say was:  "SeekEOF(F)" -- but that only
> works on files of type TEXT, not files of {type}...

        I just looked up in my manual, and to my surprise there is indeed a
SeekEOF function.  That's neat..  I didn't know it existed.

        Guess you learn something everyday.  But you're right, it only works on
text files.  Why, I have no idea.  Most files do have an EOF, so it seems
reasonable that it would be able to go the end of those as well.  Case of lazy
library programmer?

-- 
Steve Madsen
Miami University  Oxford, OH
Internet: sjmadsen@miavx1.acs.muohio.edu
Newsgroups: comp.lang.pascal
Subject: Help : Compression Algorithms
From: ebolog@elaine.ee.und.ac.za (EDWIN BOLOGNA : THIRD)
Date: 20 Aug 92 13:10:57 +0200
Organization: Electronic Eng., Univ. Natal, Durban, South Africa


Does anyone out there happen to have PAS, C, or ASM source code to decode
and code LZH, or other good compression formats.

Any information at all on any of these formats will be greatly appreciated.

        Desperate fellow programmer (And very Greatful for any information)

                E.B. (EBOLOG@ELAINE.EE.UND.AC.ZA)

PS : Please be kind hearted and Assist !
Newsgroups: comp.lang.pascal
From: billb@crpmks.uucp (Bill Bochnik (Info Systems))
Subject: Re: Rounding real #s
Reply-To: billb@crpmks.UUCP (Bill Bochnik (Info Systems))
Organization: Ciba-Geigy Corporation
Date: Wed, 12 Aug 1992 13:41:12 GMT
Keywords: Rounding

In article <1992Aug11.082014.26260@qiclab.scn.rain.com> 70465.203@compuserve.com writes:
>wmorgan@tony.ksu.ksu.edu () writes:
>
>>	I am a new user of TP 6.0, and would like to know how to round a
>>real number to 2 decimal places, I.E. round 456.2345 to 456.23.  I am working
>>on a payroll program.
>
>in a Write, or writeln, you just tack :x:y onto the variable. eg
>	write(pay:6:2)
>will print the contents of pay as a 6 place number with two places to the
>left of the decimal.
>-123.45
> 123.45
>
>etc.
>

Truncated, not rounded.

-- 
Bill Bochnik			| It's hard to be a James Bond in an Abbott
Systems Analyst 		|	and Costello world.
Ciba-Geigy Corporation		| Signed and sealed, they deliver oblivion.
philabs!crpmks!billb		| It's worse than that, he's dead Jim.
From: thompson@atlas.socsci.umn.edu (T. Scott Thompson)
Newsgroups: comp.lang.pascal
Subject: Re: Help with wierd TP 6.0 IDE problem, please!
Date: 21 Aug 92 16:04:32 GMT
Reply-To: thompson@atlas.socsci.umn.edu
Organization: Economics Department, University of Minnesota

S_JUFFA@iravcl.ira.uka.de (|S| Norbert Juffa) writes:

[description of problem deleted]

It occurs to me that the problem might not have anything to do with
virtual vs. real mode.  Perhaps it depends on whether or not the IDE
is using expanded memory.  If you don't load QEMM or EMM386 then the
IDE does not see any expanded memory available.  Perhaps you could
test for this by booting QEMM with whatever switches are needed to
turn off expanded memory emulation.
Newsgroups: comp.lang.pascal
From: br707@cleveland.Freenet.Edu (Mike L. Melamed)
Subject: TVision Help on HELP..
Organization: Case Western Reserve University, Cleveland, Ohio, (USA)
Date: Sun, 16 Aug 92 17:50:10 GMT


Could someone provide me with a small example that would show the work
of Help in TurboVision? 


Thanks

  in


Advance






--
Newsgroups: comp.lang.pascal
Subject: Re: Updating
From: sjmadsen@miavx1.acs.muohio.edu (Steve Madsen)
Date: 20 Aug 92 12:39:17 -0500
Organization: Miami of Ohio

>>Assign( F, "MYFILE" );
>>Reset( F );
>>Seek(FileSize( F ));  { This should take you to the end of the file }
> 
> Wouldn't Seek(EOF) work just as well, and read more clearly?

        EOF returns a boolean value, so I'd say no...

-- 
Steve Madsen
Miami University  Oxford, OH
Internet: sjmadsen@miavx1.acs.muohio.edu