Add a Tk version check.
authorsls <sls>
Thu, 16 Feb 1995 00:09:08 +0000 (00:09 +0000)
committersls <sls>
Thu, 16 Feb 1995 00:09:08 +0000 (00:09 +0000)
version.tcl

index daefc5cd40c3d2d2ebd1aa55ad840c30f38e6181..1b1b619ef1a76f6a9b775c965d9a39e0a03f43c7 100644 (file)
@@ -5,7 +5,14 @@
 #
 
 proc version_init {} {
-    global tkinspect
-    set tkinspect(release) 5.0.4
+    global tkinspect tk_version
+    set tkinspect(release) 5.0.5
     set tkinspect(release_date) "Feb 14, 1995"
+    scan $tk_version "%d.%d" major minor
+    if {$major != 4} {
+       puts stderr \
+      "tkinspect-5 requires Tk 4.x, you appear to be running Tk $major.$minor"
+       exit 1
+    }
 }
+