home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tk3.3b1 / README < prev    next >
Encoding:
Text File  |  1993-07-10  |  10.5 KB  |  230 lines

  1. The Tk Toolkit
  2.  
  3. by John Ousterhout
  4. University of California at Berkeley
  5. ouster@cs.berkeley.edu
  6.  
  7. 1. Introduction
  8. ---------------
  9.  
  10. This directory contains the sources and documentation for Tk, an
  11. X11 toolkit that provides the Motif look and feel and is implemented
  12. using the Tcl scripting language.  The information here corresponds
  13. to 3.3b1, a beta release of Tk 3.3.  It is designed to work with
  14. Tcl 7.0b1 and may not work with other releases of Tcl.
  15.  
  16. 2. Documentation
  17. ----------------
  18.  
  19. The best way to get started with Tk is to read the draft of my upcoming
  20. book on Tcl and Tk, which can be retrieved using anonymous FTP from the
  21. directory "tcl" on sprite.berkeley.edu.  Part II of the book provides
  22. an introduction to writing Tcl scripts for Tk and Part IV describes how
  23. to build new widgets and geometry managers in C using Tk's library
  24. procedures.
  25.  
  26. The "doc" subdirectory in this release contains a complete set of manual
  27. entries for Tk.  Files with extension ".1" are for programs such as
  28. wish; files with extension ".3" are for C library procedures; and files
  29. with extension ".n" describe Tcl commands.  To print any of the manual
  30. entries, cd to the "doc" directory and invoke your favorite variant of
  31. troff using the normal -man macros, for example
  32.  
  33.         ditroff -man wish.1
  34.  
  35. to print wish.1.  If Tk has been installed correctly and your "man"
  36. program supports it, you should be able to access the Tcl manual entries
  37. using the normal "man" mechanisms, such as
  38.  
  39.         man wish
  40.  
  41. 3. Compiling and installing Tk
  42. ------------------------------
  43.  
  44. This release should compile and run with little or no effort on any
  45. UNIX-like system that approximates POSIX, BSD, or System V and runs
  46. the X Window System.  I know that it runs on workstations from Sun,
  47. DEC, H-P, IBM, and Silicon Graphics, and on PC's running SCO UNIX
  48. and Xenix.  To compile Tk, do the following:
  49.  
  50.     (a) Make sure that this directory and the corresponding release of
  51.         Tcl are both subdirectories of the same directory.  This
  52.     directory should be named tk3.3b1 and the Tcl release directory
  53.     should be named tcl7.0b1.
  54.  
  55.     (b) Type "./configure" in this directory.  This runs a configuration
  56.     script created by GNU autoconf, which configures Tcl for your
  57.     system and creates a Makefile.
  58.  
  59.     (c) Type "make".  This will create a library archive called "libtk.a"
  60.     and an interpreter application called "wish" that allows you to type
  61.     Tcl commands interactively or execute script files.
  62.  
  63.     (d) If the make fails then you'll have to personalize the Makefile
  64.         for your site.  You may also wish to personalize the Makefile to
  65.     modify the install directories, etc.  There are comments at the
  66.     beginning of the Makefile that describe the things you might want
  67.     to change and how to change them.
  68.     
  69.     (e) Type "make install" to install Tk's binaries and script files in
  70.         standard places.  In the default configuration information will
  71.     be installed in /usr/local so you'll need write permission on
  72.     this directory.
  73.  
  74.     (f) At this point you can play with Tcl by invoking the "wish"
  75.     program and typing Tcl commands.  However, if you haven't installed
  76.     Tk then you'll first need to set your TK_LIBRARY environment
  77.     variable to hold the full path name of the "library" subdirectory.
  78.     If you haven't installed Tcl either then you'll need to set your
  79.     TCL_LIBRARY environment variable as well (see the Tcl README file
  80.     for information on this).
  81.  
  82. If you have trouble compiling Tk, I'd suggest looking at the file
  83. "porting.notes".  It contains information that people have sent me about
  84. changes they had to make to compile Tcl in various environments.  I make
  85. no guarantees that this information is accurate, complete, or up-to-date,
  86. but you may find it useful.  If you get Tk running on a new configuration
  87. and had to make non-trivial changes to do it, I'd be happy to receive new
  88. information to add to "porting.notes".  I'm also interested in hearing
  89. how to change the configuration setup so that Tcl compiles on additional
  90. platforms "out of the box".
  91.  
  92. 4. Test suite
  93. -------------
  94.  
  95. Tk now has the beginnings of a self-test suite, consisting of a set of
  96. scripts in the subdirectory "tests".  To run the test suite just type
  97. "make test" in this directory.  You should then see a printout of the
  98. test files processed.  If any errors occur, you'll see a much more
  99. substantial printout for each error.  See the README file in the
  100. "tests" directory for more information on the test suite.
  101.  
  102. 5. Getting started
  103. ------------------
  104.  
  105. Once wish is compiled you can use it to play around with the Tk
  106. facilities.  If you run wish with no arguments, it will open a small
  107. window on the screen and read Tcl commands from standard input.
  108. Or, you can play with some of the pre-canned scripts in the subdirectory
  109. library/demos.  See the README file in the directory for a description
  110. of what's available.  The file library/demos/widget is a script that
  111. you can use to invoke many individual demonstrations of Tk's facilities.
  112.  
  113. If you want to start typing Tcl/Tk commands to wish, I'd suggest
  114. starting with a widget-creation command like "button", and also learn
  115. about the "pack" and "place" commands for geometry management.  Note:
  116. when you create a widget, it won't appear on the screen until you tell
  117. a geometry manager about it.  The only geometry managers at present
  118. are the packer and the placer.  If you don't already know Tcl, read the
  119. Tcl book excerpt that can be FTP'ed separately from the distribution
  120. directory.
  121.  
  122. Andrew Payne has written a very nice demo script called "The Widget Tour"
  123. that introduces you to writing Tk scripts.  This script is available
  124. from the Tcl contributed archive described below.  If you're just
  125. getting started with Tk I strongly recommend trying out the widget tour.
  126.  
  127. 6. Summary of changes in this release
  128. -------------------------------------
  129.  
  130. Tk 3.3 consists mostly of bug fixes plus upgrades to make it compatible
  131. with Tcl 7.0.  It should not introduce any compatibility problems itself,
  132. but it requires Tcl 7.0, which introduces several incompatibilities
  133. (see the Tcl README file for details).  The file "changes" contains a
  134. complete list of all changes to Tk, including both bug fixes and new
  135. features.  Here is a short list of a few of the most significant new
  136. features:
  137.  
  138.     1. Tk is now consistent with the book drafts.  This means that the
  139.     new packer syntax has been implemented and additional bitmaps and
  140.     reliefs are available.
  141.  
  142.     2. Tk now supports stacking order.  Windows will stack in the order
  143.     created, and "raise" and "lower" commands are available to change
  144.     the stacking order.
  145.  
  146.     3. There have been several improvements in configuration:  GNU
  147.     autoconf is now used for configuration;  wish now supports the
  148.     Tcl_AppInit procedure;  and there's a patchlevel.h file that will
  149.     be used for future patches.  The Tk release no longer includes a
  150.     Tcl release; you'll have to retrieve Tcl separately.
  151.  
  152.     4. The Tk script library contains a new procedure "tk_dialog" for
  153.     creating dialog boxes, and the default "tkerror" has been improved
  154.     to use tk_dialog.
  155.  
  156.     5. Tk now provides its own "exit" command that cleans up properly,
  157.     so it's now safe to use "exit" instead of "destroy ." to end wish
  158.     applications.
  159.  
  160.     6. Cascade menu entries now display proper Motif arrows.
  161.  
  162. 7. Tcl/Tk newsgroup
  163. -------------------
  164.  
  165. There is a network news group "comp.lang.tcl" intended for the exchange
  166. of information about Tcl, Tk, and related applications.  Feel free to use
  167. this newsgroup both for general information questions and for bug reports.
  168. I read the newsgroup and will attempt to fix bugs and problems reported
  169. to it.
  170.  
  171. 8. Tcl/Tk contributed archive
  172. --------------------------
  173.  
  174. Many people have created exciting packages and applications based on Tcl
  175. and/or Tk and made them freely available to the Tcl community.  An archive
  176. of these contributions is kept on the machine harbor.ecn.purdue.edu.  You
  177. can access the archive using anonymous FTP;  the Tcl contributed archive is
  178. in the directory "pub/tcl".
  179.  
  180. 9. Support and bug fixes
  181. ------------------------
  182.  
  183. I'm very interested in receiving bug reports and suggestions for
  184. improvements.  Bugs usually get fixed quickly (particularly if they
  185. are serious), but enhancements may take a while and may not happen at
  186. all unless there is widespread support for them (I'm trying to slow
  187. the rate at which Tk turns into a kitchen sink).  It's becoming
  188. increasingly difficult to make incompatible changes to Tk, but it's
  189. not totally out of the question.
  190.  
  191. The Tcl/Tk community is too large for me to provide much individual
  192. support for users.  If you need help I suggest that you post questions
  193. to comp.lang.tcl.  I read the newsgroup and will attempt to answer
  194. esoteric questions for which no-one else is likely to know the answer.
  195. In addition, Tcl/Tk support and training are available commercially from
  196. NeoSoft.  For more information, send e-mail to "info@neosoft.com".
  197.  
  198.  
  199. 10. Release organization
  200. ---------------------------
  201.  
  202. Each Tk release is identified by two numbers separated by a dot, e.g.
  203. 3.2 or 3.3.  If a new release contains changes that are likely to break
  204. existing C code or Tcl scripts then the major release number increments
  205. and the minor number resets to zero: 3.0, 4.0, etc.  If a new release
  206. contains only bug fixes and compatible changes, then the minor number
  207. increments without changing the major number, e.g. 3.1, 3.2, etc.  If
  208. you have C code or Tcl scripts that work with release X.Y, then they
  209. should also work with any release X.Z as long as Z > Y.
  210.  
  211. Beta releases have an additional suffix of the form bx.  For example,
  212. Tk 3.3b1 is the first beta release of Tk version 3.3, Tk 3.3b2 is
  213. the second beta release, and so on.  A beta release is an initial
  214. version of a new release, used to fix bugs and bad features before
  215. declaring the release stable.  Each new release will be preceded by
  216. one or more beta releases.  I hope that lots of people will try out
  217. the beta releases and report problems back to me.  I'll make new beta
  218. releases to fix the problems, until eventually there is a beta release
  219. that appears to be stable.  Once this occurs I'll remove the beta
  220. suffix so that the last beta release becomes the official release.
  221.  
  222. If a new release contains incompatibilities (e.g. 4.0) then I can't
  223. promise to maintain compatibility among its beta releases.  For example,
  224. release 4.0b2 may not be backward compatible with 4.0b1.  I'll try
  225. to minimize incompatibilities between beta releases, but if a major
  226. problem turns up then I'll fix it even if it introduces an
  227. incompatibility.  Once the official release is made then there won't
  228. be any more incompatibilities until the next release with a new major
  229. version number.
  230.