invalid command name "wm"
    while executing
"wm title . {HTML File Viewer}"
    (in namespace eval "::request" script line 10)
    invoked from within
"namespace eval ::request $script"
    ("::try" body line 12)

OUTPUT BUFFER:

# # This script implements the "hv" application. Type "hv FILE" to # view FILE as HTML. # # This application is used for testing the HTML widget. It can # also server as an example of how to use the HTML widget. # # @(#) $Id: hv.tcl,v 1.25 2000/02/19 18:37:52 drh Exp $ # wm title . {HTML File Viewer} wm iconname . {HV} # Make sure the html widget is loaded into # our interpreter # package require Img if {[info command html]==""} { if {![package require Tkhtml]} return foreach f { ./tkhtml.so /usr/lib/tkhtml.so /usr/local/lib/tkhtml.so ./tkhtml.dll } { if {[file exists $f]} { if {[catch {load $f Tkhtml}]==0} break } } } # The HtmlTraceMask only works if the widget was compiled with # the -DDEBUG=1 command-line option. "file" is the name of the # first HTML file to be loaded. # set HtmlTraceMask 0 set file {} foreach a $argv { if {[regexp {^debug=} $a]} { scan $a "debug=0x%x" HtmlTraceMask } else { set file $a } } # These images are used in place of GIFs or of form elements # image create photo biggray -data { R0lGODdhPAA+APAAALi4uAAAACwAAAAAPAA+AAACQISPqcvtD6OctNqLs968+w+G4kiW5omm 6sq27gvH8kzX9o3n+s73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNFgsAO/// } image create photo smgray -data { R0lGODdhOAAYAPAAALi4uAAAACwAAAAAOAAYAAACI4SPqcvtD6OctNqLs968+w+G4kiW5omm 6sq27gvH8kzX9m0VADv/ } image create photo nogifbig -data { R0lGODdhJAAkAPEAAACQkADQ0PgAAAAAACwAAAAAJAAkAAACmISPqcsQD6OcdJqKM71PeK15 AsSJH0iZY1CqqKSurfsGsex08XuTuU7L9HywHWZILAaVJssvgoREk5PolFo1XrHZ29IZ8oo0 HKEYVDYbyc/jFhz2otvdcyZdF68qeKh2DZd3AtS0QWcDSDgWKJXY+MXS9qY4+JA2+Vho+YPp FzSjiTIEWslDQ1rDhPOY2sXVOgeb2kBbu1AAADv/ } image create photo nogifsm -data { R0lGODdhEAAQAPEAAACQkADQ0PgAAAAAACwAAAAAEAAQAAACNISPacHtD4IQz80QJ60as25d 3idKZdR0IIOm2ta0Lhw/Lz2S1JqvK8ozbTKlEIVYceWSjwIAO/// } # Construct the main window # frame .mbar -bd 2 -relief raised pack .mbar -side top -fill x menubutton .mbar.file -text File -underline 0 -menu .mbar.file.m pack .mbar.file -side left -padx 5 set m [menu .mbar.file.m] $m add command -label Open -underline 0 -command Load $m add command -label Refresh -underline 0 -command Refresh $m add separator $m add command -label Exit -underline 1 -command exit menubutton .mbar.view -text View -underline 0 -menu .mbar.view.m pack .mbar.view -side left -padx 5 set m [menu .mbar.view.m] set underlineHyper 0 $m add checkbutton -label {Underline Hyperlinks} -variable underlineHyper trace variable underlineHyper w ChangeUnderline proc ChangeUnderline args { global underlineHyper .h.h config -underlinehyperlinks $underlineHyper } set showTableStruct 0 $m add checkbutton -label {Show Table Structure} -variable showTableStruct trace variable showTableStruct w ShowTableStruct proc ShowTableStruct args { global showTableStruct HtmlTraceMask if {$showTableStruct} { set HtmlTraceMask [expr {$HtmlTraceMask|0x8}] .h.h config -tablerelief flat } else { set HtmlTraceMask [expr {$HtmlTraceMask&~0x8}] .h.h config -tablerelief raised } Refresh } set showImages 1 $m add checkbutton -label {Show Images} -variable showImages trace variable showImages w Refresh # Construct the main HTML viewer # frame .h pack .h -side top -fill both -expand 1 html .h.h \ -yscrollcommand {.h.vsb set} \ -xscrollcommand {.f2.hsb set} \ -padx 5 \ -pady 9 \ -formcommand FormCmd \ -imagecommand ImageCmd \ -scriptcommand ScriptCmd \ -appletcommand AppletCmd \ -underlinehyperlinks 0 \ -bg white -tablerelief raised # If the tracemask is not 0, then draw the outline of all # tables as a blank line, not a 3D relief. # if {$HtmlTraceMask} { .h.h config -tablerelief flat } # A font chooser routine. # # .h.h config -fontcommand pickFont proc pickFont {size attrs} { puts "FontCmd: $size $attrs" set a [expr {-1<[lsearch $attrs fixed]?{courier}:{charter}}] set b [expr {-1<[lsearch $attrs italic]?{italic}:{roman}}] set c [expr {-1<[lsearch $attrs bold]?{bold}:{normal}}] set d [expr {int(12*pow(1.2,$size-4))}] list $a $d $b $c } # This routine is called for each form element # proc FormCmd {n cmd args} { # puts "FormCmd: $n $cmd $args" switch $cmd { select - textarea - input { set w [lindex $args 0] label $w -image nogifsm } } } # This routine is called for every markup # proc ImageCmd {args} { global OldImages Images showImages if {!$showImages} { return smgray } set fn [lindex $args 0] if {[info exists OldImages($fn)]} { set Images($fn) $OldImages($fn) unset OldImages($fn) return $Images($fn) } if {[catch {image create photo -file $fn} img]} { return smgray } if {[image width $img]*[image height $img]>20000} { global BigImages set b [image create photo -width [image width $img] \ -height [image height $img]] set BigImages($b) $img set img $b after idle "MoveBigImage $b" } set Images($fn) $img return $img } proc MoveBigImage b { global BigImages if {![info exists BigImages($b)]} return $b copy $BigImages($b) image delete $BigImages($b) unset BigImages($b) update } # This routine is called for every