Problem with pdf4tcl, canvas and Tcl/Tk 9.0

Liste des GroupesRevenir à cl tcl 
Sujet : Problem with pdf4tcl, canvas and Tcl/Tk 9.0
De : gregor.ebbing (at) *nospam* gmx.de (greg)
Groupes : comp.lang.tcl
Date : 02. Feb 2025, 08:45:28
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vnn7qo$j9lu$1@dont-email.me>
User-Agent : Mozilla Thunderbird
# Example Script
#set auto_path [linsert $auto_path 0 [file normalize  "../"]]
package require Tk
package require pdf4tcl
# canvas
set c [canvas .c -width 400 -height 300 -bg white]
pack $c -fill both -expand 1
set text_id [$c create text 200 150 -text "Hallo, Tcl/Tk!" -font "Arial 16"]
pdf4tcl::new mypdf -paper a4
mypdf canvas .c
mypdf write -file canvas.pdf
# System:
if {0} {
pdf4tcl: 0.9.4
source /usr/local/share/tcltk/pdf4tcl0.9.4/pdf4tcl.tcl
Tcl/Tk:9.0.1 / Linux
nameofexecutable: /usr/bin/tclsh9.0
#Output:
cannot use non-numeric string "" as left operand of "-"
     while executing
"expr {$underline - $isum}"
     (procedure "CanvasGetWrappedText" line 16)
     invoked from within
"CanvasGetWrappedText $path $id underline"
     (class "::pdf4tcl::pdf4tcl" method "CanvasDoItem" line 173)
     invoked from within
"my CanvasDoItem $path $id [$path coords $id] opts"
     (class "::pdf4tcl::pdf4tcl" method "canvas" line 164)
     invoked from within
"mypdf canvas .c"
}
if {0} {
   Problem with pdf4tcl, canvas and Tcl/Tk 9.0.
   No error message with Tcl/Tk 8.6.16.
   Could this be due to changes in Tcl/Tk 9.0?
I looked at underline in the CanvasDoItem method in ::pdf4tcl::pdf4tcl
with
tcl::unsupported::representation underline
value is a pure string with a refcount of 4, object pointer at 0x55ca273d5cb0, string representation "underline"
   But that doesn't help me. I haven't found any changes in 9.0 that have this effect.
regards
Gregor
}

Date Sujet#  Auteur
2 Feb 25 * Problem with pdf4tcl, canvas and Tcl/Tk 9.02greg
2 Feb 25 `- Re: Problem with pdf4tcl, canvas and Tcl/Tk 9.01greg

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal