git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitk: Remove mc parameter from proc show_error

From
Alex Henrie <alexhenrie24@gmail.com>
Date
May 3, 2015, 04:24 UTC
Message-ID
<CAMMLpeQj2N9Qa+KKiaCRUOjx_=cAf=GTW6QADBySE9VsY_Xg=w@mail.gmail.com>
In-Reply-To
<20150502100513.GA19038@iris.ozlabs.ibm.com>
2015-05-02 4:05 GMT-06:00 Paul Mackerras <paulus@samba.org>:
Show 19 quoted lines
> To test this, I changed {package require Tk 8.4} to {package require
> Tk 8.7}, in order to deliberately trigger the error.  When I run gitk
> with that change (and your patch applied), I get this in the xterm
> where I run gitk:
>
> $ ./gitk
> Error in startup script: invalid command name "mc"
>     while executing
> "mc OK"
>     (procedure "show_error" line 7)
>     invoked from within
> "show_error {} . "Sorry, gitk cannot run with this version of Tcl/Tk.\n Gitk requires at least Tcl/Tk 8.4.""
>     invoked from within
> "if {[catch {package require Tk 8.7} err]} {
>     show_error {} . "Sorry, gitk cannot run with this version of Tcl/Tk.\n\
>                      Gitk requires at least ..."
>     (file "./gitk" line 12012)
>
> and no pop-up window.  So this patch still isn't quite right.
Good point. We can fix this by importing ::msgcat::mc earlier.
> Given that old versions of tcl/tk probably don't have [mc], I think
> it's inevitable that "OK" will have to be untranslated for that
> particular error path.
msgcat and ::msgcat::mc were added in Tcl 8.1a2, released Febuary 23,
1998. See the "changes" file in
<ftp://ftp.tcl.tk/pub/tcl/tcl8_1/tcl8.1.tar.gz>. Surely you are not
trying to support Tcl 8.0 and earlier, so we should be able to use mc
all we want.
-Alex
Previous: Paul Mackerras
Message 3 of 3 in “gitk: Remove mc parameter from proc show_error”
  1. gitk: Remove mc parameter from proc show_errorAlex Henrie, May 2, 2015
  2. Paul MackerrasMay 2, 2015
  3. Alex HenrieMay 3, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.