#41 expected integer but got "bold"

open
nobody
None
5
2008-06-30
2008-06-30
Anonymous
No

On a mandriva 2008.1 distrib, I get the following error messages when I type "tkdiff -v" :

Error in startup script: expected integer but got "bold"
(processing "-font" option)
invoked from within
".client.left.text tag configure inlinetag -background DodgerBlue -font {TkFixedFont bold}"
("eval" body line 1)
invoked from within
"eval "$widget tag configure $tag $opts($tag)""
(procedure "build-client" line 106)
invoked from within
"build-client"
(procedure "create-display" line 40)
invoked from within
"create-display"
(procedure "main" line 57)
invoked from within
"main"
(file "/home/common/opt/tkdiff-4.1.3-unix/tkdiff" line 9515)

Discussion

  • I am getting this same error with tkdiff for Windows:

    tkdiff: Whatever version ships with TkCVS 7.2.5
    tcl/tk: ActiveTcl 8.5.4.0

    I found a few bug reports, this one is the most informative:

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473050

    Scroll down to message #40 and there is a patch to fix the error:

    --- BEGIN QUOTE ---
    Philippe Poilbarbe wrote:

    It seems that the problem come when there is 'bold' or anything else
    after the font without the font size.
    Here is a patch which corrects this:

    --- tkdiff.orig 2008-04-18 10:20:54.556590000 +0200
    +++ tkdiff 2008-04-18 10:25:33.459190000 +0200
    @@ -155,7 +155,11 @@
    #debug-info "entryfont $entryfont"

    set font [list $textfont]
    -set bold [list [concat $textfont bold]]
    +if {$tk_version < 8.5} {
    + set bold [list [concat $textfont bold]]
    +} else {
    + set bold [list [concat $textfont -12 bold]]
    +}
    #debug-info "font: $font"
    #debug-info "bold: $bold\n"
    option add *Label.font $labelfont userDefault

    ---- END QUOTE ----

     
  • It seems that this problem comes with Tcl 8.5.4.0. With 8.4.13 same Tkdiff 4.1.3 works fine.

     
  • Tkdiff 4.1.3 solves the problem here. But you may have to change the properties in ~/.tkdiffrc as 4.1.4 showed font-problems when running with 8.5.4.0. The problems were not when running 4.1.4 with an older Tcl version (8.4.7).
    It helped to delete all -font specs out of ~/.tkdiffrc. Tests were on RHEL 4U6.