{jtkversion.tcl

Introduction
The jtkversion.tcl library is distributed as part of the jstools package.  It consists of procedures to make it easier to write scripts that will work under both Tk 3 and Tk 4.

This document describes jtkversion.tcl version 4.0/4.0.

Usage
Accessing the Library
In order to use the jtkversion.tcl library, it (and any other libraries it depends on) must be in your Tcl auto_path, described in tclvars(n).  Information about how to arrange that, and other conventions common to the jstools libraries, is in the Usage section of The jstools Libraries.

Credits and Copyright
Author
Jay Sekora 
js@calumet.org
http://shore.net/~js/

Copyright
The library is copyright © 1992-1995 by Jay Sekora, but may be freely redistributed under the conditions at the top of the file.

Overview
Procedures
j:tk4 - perform an action if running under Tk version 4 or greater
j:tk3 - perform an action if running under Tk version 3 or earlier

See Also
	jtkutils.tcl

j:tk4
Usage
	j:tk4 [command]

Description
This procedure executes command (in the calling procedure's stack frame) if and only if running under Tk version 4 or later.  It returns 1 if the command was executed (i.e., if the version of Tk it's running under is 4 or greater) and 0 otherwise.  If command is omitted, no action is performed, but the return value still indicates what version of Tk is being used.

j:tk3
Usage
	j:tk3 [command]

Description
This procedure executes command (in the calling procedure's stack frame) if and only if running under Tk version 3 or earlier.  It returns 1 if the command was executed (i.e., if the version of Tk it's running under is 3 or less) and 0 otherwise.  If command is omitted, no action is performed, but the return value still indicates what version of Tk is being used.

Bugs and Misfeatures
* All these procedures are really misfeatures. :-)  They'll probably go away in the future as Tk 4 becomes more prevalent and Tk 3 dies out.

* As mentioned, j:current_focus doesn't handle multiple displays.

Future Directions
* These procedures started as a stop­gap solution to get the jstools applications and libraries, which are written for Tk 3.6, to run under Tk 4.0.  When jstools no longer supports Tk 3.6, these procedures may go away (or be replaced with different procedures to support a different historical range of Tk and Tcl versions).

} {{{jdoc:xref:link {4.57 4.64 10.215 10.236 10.244 10.261 10.265 10.286 23.0 23.5 24.0 24.5 27.1 27.13 46.16 46.31}} {jdoc:xref:manpage {10.131 10.138}} {jdoc:anchor:anchorname {3.0 4.0 8.0 9.0 12.0 13.0 21.0 22.0 29.0 30.0 36.0 37.0}} {richtext:font:roman {2.0 3.0 4.0 4.4 4.18 4.57 4.64 6.24 6.38 8.0 10.0 10.20 10.34 10.107 10.116 10.131 10.138 10.219 10.226 10.248 10.253 10.265 10.286 12.0 14.0 15.0 15.14 16.0 16.21 18.0 19.0 21.0 23.5 24.0 24.5 26.0 27.0 27.1 27.13 29.0 31.0 31.1 31.7 31.8 31.15 33.0 34.0 34.24 34.31 34.137 34.138 34.252 34.259 36.0 38.0 38.1 38.7 38.8 38.15 40.0 41.0 41.24 41.31 41.139 41.140 41.251 41.258 43.0 44.0 46.16 46.31 48.0 49.0 49.61 49.68 49.154 49.161 51.0}} {richtext:font:italic {31.8 31.15 34.24 34.31 34.252 34.259 38.8 38.15 41.24 41.31 41.251 41.258}} {richtext:font:bold {4.4 4.18 4.57 4.64 6.24 6.38 10.20 10.34 10.219 10.226 27.1 27.13 49.61 49.68 49.154 49.161}} {richtext:font:bolditalic {10.248 10.253 10.265 10.286}} {richtext:font:typewriter {10.107 10.116 10.131 10.138 15.0 15.14 16.0 16.21 23.0 23.5 24.0 24.5 31.1 31.7 34.137 34.138 38.1 38.7 41.139 41.140 46.16 46.31}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {3.0 4.0 8.0 9.0 12.0 13.0 21.0 22.0 29.0 30.0 36.0 37.0 43.0 44.0 48.0 49.0}} {richtext:font:heading2 {9.0 10.0 13.0 14.0 18.0 19.0 22.0 23.0 26.0 27.0 30.0 31.0 33.0 34.0 37.0 38.0 40.0 41.0}} {{} {12.0 19.0 22.0 22.10}} {jdoc:link:jstools.jdoc {4.57 4.64}} {jdoc:manpage:tclvars {10.131 10.138}} {jdoc:link:jslibraries.jdoc#Usage {10.244 10.261}} {jdoc:link:jslibraries.jdoc {10.265 10.286}} {jdoc:anchorname:Credits_and_Copyright {12.0 13.0}} {jdoc:anchorname:Introduction {3.0 4.0}} {jdoc:anchorname:Usage {8.0 9.0}} {jdoc:link:jslibraries.tcl {10.215 10.236}} {jdoc:anchorname:Overview {21.0 22.0}} {jdoc:link:jtkutils.tcl.jdoc {27.1 27.13}} {jdoc:link:#j:tk4 {23.0 23.5}} {jdoc:link:#j:tk3 {24.0 24.5}} {jdoc:link:#j:current_focus {46.16 46.31}} {jdoc:anchorname:j:tk4 {29.0 30.0}} {jdoc:anchorname:j:tk3 {36.0 37.0}}} {{richptr 43.0} {del_from 51.0} {matchend 49.18} {abbrevstart 50.0} {abbrevend 50.0} {insert 1.0} {del_to 51.0} {matchstart 49.8} {anchor 1.0} {emacs_mark 51.0} {current 1.0}}}