• tk print and diffs with wish and tclsh

    From greg@21:1/5 to All on Tue Sep 12 21:31:23 2023
    when calling the script with wish, tclsh and tclsh with tkcon
    wish an error on the 2nd print call
    tclsh and tkcon an error on the 2nd print call
    tclsh an error on the 1st print call

    tcltk from https://degitlab-ext.terma.com/tper/tcltk


    #printtest001.tclI have different results
    package require Tk
    #package require tkcon
    #tkcon show
    proc call {} {
    set err ""
    catch {tk print .t} out
    .t insert end "arr: [array get ::tk::print::printargs]\n"
    .t insert end "out: $out \n\n"

    }

    text .t
    button .btn -text print -command {call}
    .t insert end "[info patchlevel] \n"
    .t insert end "[tk windowingsystem]\n"
    .t insert end "[info nameofexecutable]\n"
    #.t insert end "arr: [array get ::tk::print::printargs]\n"

    pack .t -fill both -expand 1
    pack .btn -expand 0

    if {0} {
    #wish87.exe
    #1
    8.7a6
    win32
    C:/Tcl/bin/wish87.exe
    arr: resolution {600 600} pl 11692 tm 1000 lm 1000 resx 600 copies 1 resy 600 bm 1000 rm 1000 pw 8267 hDC šjÏü
    out:
    #2
    arr: resolution {600 600} pl 11692 tm 1000 lm 1000 resx 600 copies 1 resy 600 bm 1000 rm 1000 pw 8267 hDC šjÏü
    out: can't read "charwidths()": no such element in array

    #tclsh
    8.7a6
    win32
    C:/Tcl/bin/tclsh.exe
    arr:
    out: can't read "printargs(hDC)": no such element in array


    #tclsh and tkcon
    #1
    8.7a6
    win32
    C:/Tcl/bin/tclsh.exe
    arr: resolution {600 600} pl 11692 tm 1000 lm 1000 resx 600 copies 1 resy 600 bm 1000 rm 1000 pw 8267 hDC Àè—S
    out:

    #2
    arr: resolution {600 600} pl 11692 tm 1000 lm 1000 resx 600 copies 1 resy 600 bm 1000 rm 1000 pw 8267 hDC Àè—S
    out: can't read "charwidths(À)": no such element in array



    }

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)