Thread (4 messages) 4 messages, 2 authors, 2016-06-15

Re: [PATCH 1/2] gitk: Initialize msgcat before first use

flat view

From: Pat Thoyts <hidden>
Date: 2016-06-15 22:47:39

Bernt Hansen [off-list ref] writes:
The error text generated when your version of Tcl is too old is
translated with msgcat (mc) before msgcat is initialized.  This
causes Tcl to abort with:

   Error in startup script: invalid command name "mc"

We now initialize msgcat first before we check the Tcl version.  Msgcat
is available since Tcl 8.1.
This doesn't quite work. [file normalize] was introduced with Tcl 8.4
and when I test this by starting it using Tcl 8.3 I get an error:
 "bad option "normalize": must be atime, attributes, channels..."
from line 11014. It is probably sufficient to just drop the [file
normalize] here. On Windows $argv0 is fully qualified and 
[file dirname] works ok on it. By removing the [file normalize] I get
the expected error dialog when testing with 8.3.

However, on Windows we actually get a better looking result by not
catching the [package require Tcl 8.4] and just letting Tk bring up a
standard message box with the version conflict error message.

Well, actually if show_error just used tk_messageBox it would look
better on Windows.

-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help