home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tkisrc04.zip / README.Tk < prev    next >
Text File  |  1998-08-13  |  14KB  |  302 lines

  1. The Tk Toolkit
  2.  
  3. by John Ousterhout (and many others at Sun Microsystems and elsewhere)
  4. john.ousterhout@eng.sun.com
  5.  
  6. SCCS: @(#) README 1.29 96/04/11 17:22:21
  7.  
  8. 1. Introduction
  9. ---------------
  10.  
  11. This directory and its descendants contain the sources and documentation
  12. for Tk, an X11 toolkit implemented with the Tcl scripting language.  The
  13. information here corresponds to Tk 4.1.  This release is designed to work
  14. with Tcl 7.5 and may not work with any other version of Tcl.
  15.  
  16. The main new feature in this release is support for the Mac and PC
  17. platforms.  Aside from the ports, the release consists mostly of bug
  18. fixes.  There are no major new features.
  19.  
  20. 2. Documentation
  21. ----------------
  22.  
  23. The best way to get started with Tk is to read one of the introductory
  24. books on Tcl and Tk:
  25.  
  26.     Tcl and the Tk Toolkit, by John Ousterhout,
  27.     Addison-Wesley, 1994, ISBN 0-201-63337-X
  28.  
  29.     Practical Programming in Tcl and Tk, by Brent Welch,
  30.     Prentice-Hall, 1995, ISBN 0-13-182007-9
  31.  
  32. The "doc" subdirectory in this release contains a complete set of
  33. reference manual entries for Tk.  Files with extension ".1" are for
  34. programs such as wish; files with extension ".3" are for C library
  35. procedures; and files with extension ".n" describe Tcl commands.  To
  36. print any of the manual entries, cd to the "doc" directory and invoke
  37. your favorite variant of troff using the normal -man macros, for example
  38.  
  39.         ditroff -man wish.1
  40.  
  41. to print wish.1.  If Tk has been installed correctly and your "man"
  42. program supports it, you should be able to access the Tcl manual entries
  43. using the normal "man" mechanisms, such as
  44.  
  45.         man wish
  46.  
  47. If you are porting Tk 3.6 scripts to Tk 4.0, you may find the Postscript
  48. file doc/tk4.0.ps useful.  It is a porting guide that summarizes the
  49. new features and discusses how to deal with the changes in Tk 4.0
  50. that are not backwards compatible.
  51.  
  52. There is also an official home for Tcl and Tk on the Web:
  53.     http://www.smli.com/research/tcl
  54. These Web pages include release updates, reports on bug fixes and porting
  55. issues, HTML versions of the manual pages, and pointers to many other
  56. Tcl/Tk Web pages at other sites.  Check them out!
  57.  
  58. 3. Compiling and installing Tk
  59. ------------------------------
  60.  
  61. This release contains everything you should need to compile and run
  62. Tk under UNIX, Macintoshes, and PCs (either Windows NT, Windows 95,
  63. or Win 3.1 with Win32s).
  64.  
  65. Before trying to compile Tk you should do the following things:
  66.  
  67.     (a) Check for a binary release.  Pre-compiled binary releases are
  68.         available now for PCs and Macintoshes, and they may be available
  69.     in the future for some flavors of UNIX.  Binary releases are much
  70.     easier to install than source releases.  To find out whether a
  71.     binary release is available for your platform, check the home page
  72.     for the Sun Tcl/Tk project (http://www.sunlabs.com/research/tcl)
  73.     and also check in the FTP directory from which you retrieved the
  74.     base distribution.
  75.  
  76.     (b) Check for patches.  Look in the FTP directory from which you
  77.         retrieved the base distribution and see if there are files with
  78.     names like tk4.1p1.patch, tk4.1p2.patch, etc.  These files may
  79.     also have .gz or .Z extensions to indicate compression.  If you find
  80.     any patch files, apply them to the source directory in order
  81.     from "p1" up.  To apply an uncompressed patch file such as
  82.     tk4.1p1.patch, invoke a shell command like the following from
  83.     the directory containing this file:
  84.         patch -p < tk4.1p1.patch
  85.     If the patch file has a .gz extension, it was compressed with
  86.     gzip.  To apply it, invoke a command like the following:
  87.         gunzip -c tk4.1p1.patch.gz | patch -p
  88.     If the patch file has a .Z extension, it was compressed with
  89.     compress.  To apply it, invoke a command like the following:
  90.         zcat tk4.1p1.patch.Z | patch -p
  91.     If you're applying a patch to a release that has already been
  92.     compiled, then before applying the patch you should cd to the
  93.     "unix" subdirectory and type "make distclean" to restore the
  94.     directory to a pristine state.
  95.  
  96. Once you've done this, change to the "unix" subdirectory if you're
  97. compiling under UNIX, "win" if you're compiling under Windows, or
  98. "mac" if you're compiling on a Macintosh.  Then follow the instructions
  99. in the README file in that directory for compiling Tk, installing it,
  100. and running the test suite.
  101.  
  102. 4. Getting started
  103. ------------------
  104.  
  105. The best way to get started with Tk is by reading one of the introductory
  106. books.
  107.  
  108. The subdirectory library/demos contains a number of pre-canned scripts
  109. that demonstrate various features of Tk.  See the README file in the
  110. directory for a description of what's available.  The file
  111. library/demos/widget is a script that you can use to invoke many individual
  112. demonstrations of Tk's facilities, see the code that produced the demos,
  113. and modify the code to try out alternatives.
  114.  
  115. 5. Summary of changes in Tk 4.1
  116. -------------------------------
  117.  
  118. The main change for Tk 4.1 is that Tk now runs on Macintosh and
  119. PC platforms as well as UNIX.  The PC port runs under Windows 3.1
  120. (with Win32s), Windows 95, and Windows NT.  This required a lot of
  121. reorganization of the sources but it didn't require any changes to
  122. Tk's externally visible interfaces.
  123.  
  124. Besides the ports and numerous bug fixes, Tk 4.1 contains the following
  125. new features.  Existing scripts for Tk 4.0 should run unchanged under
  126. Tk 4.1.
  127.  
  128.     1. There is a new command "grid" that implements a table style of
  129.        geometry management.   This will be used by future releases of
  130.        the SpecTcl GUI builder.
  131.  
  132.     2. The wish main program now supports -visual and -colormap command-
  133.        line arguments.
  134.  
  135.     3. Text widgets have been improved in several ways:
  136.     - Performance when there are many tags should be much better now;
  137.       tags should only be slow if there are a very large number of tags
  138.       on an individual character.
  139.     - There are new "dump", "mark next", "mark prev" and "tag prevrange"
  140.       widget commands for extracting information out of a text widget.
  141.  
  142.     4. Tk is now a first-class Tcl package (in the sense of the new
  143.        Tcl "package" command).  You can load Tk into a slave interpreter
  144.        "foo" with the command "load {} Tk foo" if Tk is statically
  145.        linked.  Tk can also be compiled as a shared library using the
  146.        --enable-shared switch for "configure".
  147.  
  148.     5. The event loop has moved to Tcl.  Many procedures and #defines
  149.        have been renamed, such as the "tkerror" command (now "bgerror"),
  150.        TK_READABLE (now TCL_READABLE), and Tk_DoOneEvent (now
  151.        Tcl_DoOneEvent).  All of the old Tk names are still supported
  152.        for backwards compatibility but you should switch over ASAP to
  153.        the new ones.
  154.  
  155.     6. Tk_Preserve, Tk_Release, and Tk_Eventually have been moved to Tcl.
  156.        There are #defines in tk.h for backward compatibility, but you
  157.        should switch ASAP to the new Tcl APIs.
  158.  
  159.     7. There is a new command "after info" that allows you to find out about
  160.        pending "after" handlers that haven't yet fired.
  161.  
  162.     8. Scrollbars and scales now have proper button 2 support as required
  163.        by Motif.
  164.  
  165.     9. Menus have two new options, -transient and -tearoffcommand.
  166.  
  167.     10. Entries have a new "bbox" widget command.
  168.  
  169.     11. When manual pages are installed, additional links are created for
  170.        each of the procedures described in the manual page, so that it's
  171.        easier to invoke the "man" command.
  172.  
  173.     12. Wish supports a new "--" option:  it will only process options
  174.        up through the --;  anything after that will be passed through
  175.        to the application in the argc and argv variables.
  176.  
  177. Although Tk 4.1 is compatible with Tk 4.0 scripts at the Tcl level,
  178. there are a few incompatible changes in Tk's C APIs.  These will
  179. only affect C code, not Tcl/Tk scripts, and they are obscure enough that
  180. they probably won't affect many existing extensions.  If there are any
  181. potential problems, they will be detected by an ANSI-compliant C compiler
  182. such as gcc.
  183.  
  184.     1. The procedure Tk_CreateMainWindow no longer exists.  Instead,
  185.        Tk_Init does everything that Tk_CreateMainWindow used to do.
  186.  
  187.     2. The procedures Tk_EventInit and Tk_CreateFileHandler2 have been
  188.        eliminated.  Tk_EventInit is no longer needed since the event loop
  189.        is always available.  Tk_CreateFileHandler doesn't make sense with
  190.        the new notifier in Tcl, but you can get the same effect with the
  191.        new "event source" mechanism (see the Notifier.3 manual entry in
  192.        Tcl).
  193.  
  194.     3. Tk doesn't export any global C variables anymore, because this
  195.        doesn't work with Windows DLLs.  The C variable tk_NumMainWindows
  196.        has been replaced with the procedures Tk_GetNumMainWindows(), and
  197.        the variable tk_CanvasTagsOption has been replaced with the
  198.        procedures Tk_CanvasTagsParseProc and Tk_CanvasTagsPrintProc.
  199.  
  200.     4. The interface to Tk_RestrictProc has changed so that the restrict
  201.        procedure can ask for an event to be discarded, as well as processed
  202.        or deferred.
  203.  
  204. For a complete list of all the changes in this release, see the file
  205. "changes" in this directory.
  206.  
  207. 6. Tcl/Tk newsgroup
  208. -------------------
  209.  
  210. There is a network news group "comp.lang.tcl" intended for the exchange
  211. of information about Tcl, Tk, and related applications.  Feel free to use
  212. this newsgroup both for general information questions and for bug reports.
  213. We read the newsgroup and will attempt to fix bugs and problems reported
  214. to it.
  215.  
  216. When using comp.lang.tcl, please be sure that your e-mail return address
  217. is correctly set in your postings.  This allows people to respond directly
  218. to you, rather than the entire newsgroup, for answers that are not of
  219. general interest.  A bad e-mail return address may prevent you from
  220. getting answers to your questions.  You may have to reconfigure your news
  221. reading software to ensure that it is supplying valid e-mail addresses.
  222.  
  223. 7. Tcl/Tk contributed archive
  224. --------------------------
  225.  
  226. Many people have created exciting packages and applications based on Tcl
  227. and/or Tk and made them freely available to the Tcl community.  An archive
  228. of these contributions is kept on the machine ftp.neosoft.com.  You
  229. can access the archive using anonymous FTP;  the Tcl contributed archive is
  230. in the directory "/pub/tcl".  The archive also contains several FAQ
  231. ("frequently asked questions") documents that provide solutions to problems
  232. that are commonly encountered by TCL newcomers.
  233.  
  234. 8. Support and bug fixes
  235. ------------------------
  236.  
  237. We're very interested in receiving bug reports and suggestions for
  238. improvements.  We prefer that you send this information to the
  239. comp.lang.tcl newsgroup rather than to any of us at Sun.  We'll see
  240. anything on comp.lang.tcl, and in addition someone else who reads 
  241. omp.lang.tcl may be able to offer a solution.  The normal turn-around
  242. time for bugs is 2-4 weeks.  Enhancements may take longer and may not
  243. happen at all unless there is widespread support for them (we're
  244. trying to slow the rate at which Tk turns into a kitchen sink).  It's
  245. very difficult to make incompatible changes to Tcl at this point, due
  246. to the size of the installed base.
  247.  
  248. When reporting bugs, please provide a short wish script that we can
  249. use to reproduce the bug.  Make sure that the script runs with a
  250. bare-bones wish and doesn't depend on any extensions or other
  251. programs, particularly those that exist only at your site.  Also,
  252. please include three additional pieces of information with the
  253. script:
  254.     (a) how do we use the script to make the problem happen (e.g.
  255.     what things do we click on, in what order)?
  256.     (b) what happens when you do these things (presumably this is
  257.         undesirable)?
  258.     (c) what did you expect to happen instead?
  259.  
  260. The Tcl/Tk community is too large for us to provide much individual
  261. support for users.  If you need help we suggest that you post questions
  262. to comp.lang.tcl.  We read the newsgroup and will attempt to answer
  263. esoteric questions for which no-one else is likely to know the answer.
  264. In addition, Tcl/Tk support and training are available commercially from
  265. NeoSoft (info@neosoft.com), Computerized Processes Unlimited
  266. (gwl@cpu.com), and Data Kinetics (education@dkl.com).
  267.  
  268. 9. Release organization
  269. ------------------------
  270.  
  271. Each Tk release is identified by two numbers separated by a dot, e.g.
  272. 3.2 or 3.3.  If a new release contains changes that are likely to break
  273. existing C code or Tcl scripts then the major release number increments
  274. and the minor number resets to zero: 3.0, 4.0, etc.  If a new release
  275. contains only bug fixes and compatible changes, then the minor number
  276. increments without changing the major number, e.g. 3.1, 3.2, etc.  If
  277. you have C code or Tcl scripts that work with release X.Y, then they
  278. should also work with any release X.Z as long as Z > Y.
  279.  
  280. Alpha and beta releases have an additional suffix of the form a2 or b1.
  281. For example, Tk 3.3b1 is the first beta release of Tk version 3.3,
  282. Tk 3.3b2 is the second beta release, and so on.  A beta release is an
  283. initial version of a new release, used to fix bugs and bad features
  284. before declaring the release stable.  An alpha release is like a beta
  285. release, except it's likely to need even more work before it's "ready
  286. for prime time".  New releases are normally preceded by one or more
  287. alpha and beta releases.  We hope that lots of people will try out
  288. the alpha and beta releases and report problems.  We'll make new alpha/
  289. beta releases to fix the problems, until eventually there is a beta
  290. release that appears to be stable.  Once this occurs we'll make the
  291. final release.
  292.  
  293. We can't promise to maintain compatibility among alpha and beta releases.
  294. For example, release 4.1b2 may not be backward compatible with 4.1b1, even
  295. though the final 4.1 release will be backward compatible with 4.0.  This
  296. allows us to change new features as we find problems during beta testing.
  297. We'll try to minimize incompatibilities between beta releases, but if a
  298. major problem turns up then we'll fix it even if it introduces an
  299. incompatibility.  Once the official release is made then there won't
  300. be any more incompatibilities until the next release with a new major
  301. version number.
  302.