Data done !
invalid command name "wm"
    while executing
"wm withdraw ."
    (in namespace eval "::request" script line 142)
    invoked from within
"namespace eval ::request $script"
    ("::try" body line 12)

OUTPUT BUFFER:

#!/usr/local/bin/wish ####!/home/moumou/tcl8.6b1/lubin/bin/wish8.6 #!/usr/local/bin/wish8.4 set DefTags "\>Protein I white magenta L white magenta M white magenta V white magenta ILMV white magenta R white blue K white blue RK white blue F white red Y white red W white red FYW white red D white forestgreen E white forestgreen DE white forestgreen Q black green P white black G black orange H black cyan N black cyan HN black cyan S white darkviolet T white darkviolet A white darkviolet C white darkviolet STAC white darkviolet SPC black DimGray " proc Data {{n 100} {l 1000}} { set ll [list A C D E F G H I K L M N P Q R S T V W Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .] set Lseq [list] for {set s 0} {$s < $n} {incr s} { set seq "" for {set i 0} {$i < $l} {incr i} { append seq "[lindex $ll [expr {int(50*rand())}]]" } lappend Lseq $seq } return $Lseq } proc LesLignesDufichier {f} { return [split [ContenuDuFichier $f] \n] } proc ContenuDuFichier {f} { set c [open $f r] set r [read -nonewline $c] close $c return $r } proc ConfTag {w} { set Ll [split $::DefTags \n] foreach l [lrange $Ll 1 end] { lassign $l aa fg bg $w tag configure Tag$aa -foreground $fg -background $bg } return } proc TagT {d f} { set Lgaa [list STAC DE ILMV FYW P RK Q G HN SPC] set Lfreg [list "S|T|A|C" "D|E" "I|L|M|V" "F|Y|W" "P" "R|K" "Q" "G" "H|N"] for {set i $d} {$i <= $f} {incr i} { set w .t.frlb.t$i foreach a $Lgaa freg $Lfreg { set lt {} set t [$w get 1.0 end] set lv [regexp -all -inline -indices -- $freg $t] foreach e $lv { lassign $e d f lappend lt 1.$d "1.$f+1c" } if {$lt != {}} {$w tag add Tag$a {*}$lt} } } return } ########################### proc TagOrNot {} { lassign [.t yview] t b lassign [.t cget -scrollregion] m n x y set id [expr {int($t*$y/16)}] set if [expr {int($b*$y/16)}] TagT $id $if return } proc table {w Lseq} { global CT Val nseq lgs set i 0 foreach s $Lseq { text $w.t$i \ -relief flat \ -highlightthickness 0 \ -borderwidth 0 \ -font "Courier 16 bold" \ -background DimGray \ -wrap none \ -width $lgs -height 1 \ -state normal grid $w.t$i -row $i -column 0 -sticky ew -pady 0 -ipady 0 $w.t$i insert end $s ConfTag $w.t$i incr i } return } #--- Test: set nseq 100 set lgs 1500 set Lseq [Data $nseq $lgs] set Lc [list] puts " \n Data done !\n" set ymax [expr {16*$nseq}] set xmax [expr {12*$lgs}] wm withdraw . canvas .t \ -xscrollcommand ".sx set" \ -yscrollcommand ".sy set" \ -height 200 \ -width 400 \ -scrollregion [list 0 0 $xmax $ymax] scrollbar .sx -orient horiz -command ".t xview" scrollbar .sy -command ".t yview" grid .t -row 0 -column 0 -sticky news grid .sy -row 0 -column 1 -sticky ns grid .sx -row 1 -column 0 -sticky ew bind .sy [list TagOrNot] frame .t.frlb -height $nseq -width $lgs grid .t.frlb -row 0 -column 0 -sticky news .t create window 0 0 -window .t.frlb -anchor nw update idletasks puts " Graphics done !\n" table .t.frlb $Lseq wm deiconify .