| 1 | 1/1 | 返回列表 |
| 查看: 1349 | 回復(fù): 0 | ||
| 【懸賞金幣】回答本帖問(wèn)題,作者wangyikeco將贈(zèng)送您 10 個(gè)金幣 | ||
wangyikeco木蟲 (正式寫手)
newbie
|
[求助]
tcl/tk: expected integer but got ""
|
|
|
一個(gè)TCL/TK腳本昨天都運(yùn)行的好好的,今天UBUNTU 20.4 LTS update后出現(xiàn)了expected integer but got ""這的問(wèn)題。 # select working directory and system proc select_system {} { global syssuffixlist potsuffixlist set syssuffixlist [vst2list syssuffix.vst 0 "" "" x] set potsuffixlist [vst2list potentialsuffix.vst 0 "" "" x] ######################################################################################## proc prog_dummy {s} { } ######################################################################################## proc dirlist_sel_d ub72cqx { global Wssys update; dirlist_focus $Wssys; $Wssys.c.d.f.f.li delete 0 end; update; dirselected_system $d } ######################################################################################## proc dirselected_system 6b772wq {# fills the directory selection box; sets files to default global env Wssys working_directory sysfile syssuffix liste mdatsort global potsuffix potfile pdatsort global sysdirlist global syssuffixlist potsuffixlist set cdir [expand_dollar_home $d] if {[file isdirectory $cdir]==0} { writescr0 .d.tt "\n the directory $cdir does not exist" give_warning . "WARNING \n\n the directory $cdir \n\n does not exist " return } if [winfo exists $Wssys] {set w $Wssys.d.tt} else {set w .d.tt} if {[catch {cd $cdir} m]!=0} { set working_directory [pwd] writescr0 $w "error while changing directory!\nerror message:\n$m\n" return 0 } else { set working_directory [pwd] writescr0 $w "new directory chosen: $working_directory\n\n" set sysfile "" set potfile "" set potsuffix ".pot" if {[winfo exists $Wssys]} { dirlist_anzeige $Wssys $Wssys.c.d.f.f.li delete 0 end $Wssys.c.d.f.f.li insert end "\$HOME" ".." foreach x $sysdirlist { $Wssys.c.d.f.f.li insert end "$x"} foreach k [lsort [glob -nocomplain -- *]] { if {[file isdirectory $k]} {$Wssys.c.d.f.f.li insert end $k} } ffuellen2 $Wssys.c.m.f.f.li $syssuffixlist $mdatsort ffuellen2 $Wssys.c.e.f.f.li $potsuffixlist $pdatsort } return 1 } } ######################################################################################## proc dirlist_sel_m {f} { global Wssys syssuffix sysfile liste working_directory syssuffixlist mdatsort global sysdirlist sysdirlistmaxindex DIMENSION dirlist_focus $Wssys if {[file exists $f]} { $Wssys.c.m.i delete 0 end #----- update syssuffix if needed regsub ".cif\$" $f "" X if {$f != $X} {set syssuffix ".cif"} regsub "$syssuffix\$" $f "" sysfile writescr0 $Wssys.d.tt "\n " #------------------------------------------------------------------------------------------------------- if {$syssuffix == ".cif" } { #------------------------------------------------------------------------------------------------------- writescr $Wssys.d.tt "\ncif - file selected to be converted: ${sysfile}.cif\n\n" eval set res [catch "exec cif2cell --force -p xband -f ${sysfile}.cif -o ${sysfile}.sys " message] if {![file exists ${sysfile}.sys]} { writescr $Wssys.d.tt "\nconverting the cif - file failed !!!!!! \n try to run cif2cell indepentently \n and check error message \n\n" return } else { writescr $Wssys.d.tt "\nmessage from cif2cell:\n\n$message \n\nnew sys file ${sysfile}.sys available \n\n" set syssuffix ".sys" ffuellen2 $Wssys.c.m.f.f.li $syssuffixlist $mdatsort } } #------------------------------------------------------------------------------------------------------- writescr $Wssys.d.tt "new sysfile selected and read in: $sysfile\n\n" dirlist_anzeige $Wssys read_sysfile ## writescr $Wssys.d.tt "dimension of the system: $DIMENSION \n\n" set diraux [collapse_dollar_home $working_directory] if {[llength $sysdirlist]>0} { set sysdirlist [update_dirlist $sysdirlist $sysdirlistmaxindex $diraux] } else { lappend sysdirlist $diraux } $Wssys.c.d.f.f.li delete 0 end $Wssys.c.d.f.f.li insert end "\$HOME" ".." foreach x $sysdirlist { $Wssys.c.d.f.f.li insert end "$x"} } } ######################################################################################## proc dirlist_sel_m2 {f} { global Wssys syssuffix sysfile global editor edback edxterm edoptions dirlist_focus $Wssys if {[file exists $f]} { regsub "$syssuffix\$" $f "" sysfile destros $Wssys; unlock_list } else { give_warning "." "WARNING \n\n the selected system file \n\n $f does not exists \n " } } ######################################################################################## proc dirlist_sel_e {f} { global Wssys potsuffix potfile global editor edback edxterm edoptions dirlist_focus $Wssys if {[file exists $f]} { $Wssys.c.e.i delete 0 end if {$potsuffix==""} {set potfile $f} else {regsub "$potsuffix\$" $f "" potfile} writescr0 $Wssys.d.tt "new pot-file selected: $potfile$potsuffix\n\n"; dirlist_anzeige $Wssys } } ######################################################################################## proc dirlist_sel_e2 {f} { global Wssys potsuffix potfile global editor edback edxterm edoptions dirlist_focus $Wssys if {[file exists $f]} { regsub "$potsuffix\$" $f "" potfile destros $Wssys; unlock_list } else { give_warning "." "WARNING \n\n the selected pot-file file \n\n $f does not exists \n " ######################################################################################## proc dirlist_sel_m_order {s} { global Wssys mdatsort syssuffix syssuffixlist if {$s=="alphabetical"} {set mdatsort 0} else {set mdatsort 1} ffuellen2 $Wssys.c.m.f.f.li $syssuffixlist $mdatsort } ######################################################################################## proc dirlist_sel_e_order {s} { global Wssys pdatsort potsuffix potsuffixlist if {$s=="alphabetical"} {set pdatsort 0} else {set pdatsort 1} ffuellen2 $Wssys.c.e.f.f.li $potsuffixlist $pdatsort } ######################################################################################## proc dirlist_sel_m_suffix {s} { global Wssys syssuffix sysfile mdatsort syssuffixlist $Wssys.c.m.i delete 0 end if {$syssuffix!=$s} {set syssuffix $s; set sysfile ""} ffuellen2 $Wssys.c.m.f.f.li $syssuffixlist $mdatsort writescr0 $Wssys.d.tt "new value for sysfile suffix: $syssuffix\n\n"; dirlist_anzeige $Wssys } ######################################################################################## proc dirlist_sel_e_suffix {s} { global Wssys potsuffix potfile pdatsort potsuffixlist $Wssys.c.e.i delete 0 end if {$s=="*"} then {set ns ""} else {set ns $s} if {$potsuffix!=$ns} {set potfile ""; set potsuffix $ns} ffuellen2 $Wssys.c.e.f.f.li $potsuffixlist $pdatsort writescr0 $Wssys.d.tt "new value for pot-file suffix: *$potsuffix\n\n"; dirlist_anzeige $Wssys } ######################################################################################## proc dirlist_focus {w} { global Wssys dirlist_foc if {$dirlist_foc==0} {set r 0} \ elseif {$dirlist_foc==1} {set r [dirlist_edn]} \ elseif {$dirlist_foc==2} {set r [dirlist_emfn]} \ elseif {$dirlist_foc==3} {set r [dirlist_eefn]} if {$w!=""} {focus $w} else {focus $Wssys; return $r} } |
| 1 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 復(fù)試調(diào)劑 +4 | 杰尼龜aaa 2026-03-03 | 4/200 |
|
|---|---|---|---|---|
|
[考研] 理學(xué),工學(xué),農(nóng)學(xué)調(diào)劑,少走彎路,這里歡迎您! +8 | likeihood 2026-03-02 | 11/550 |
|
|
[考研] 298求調(diào)劑 +3 | 人間唯你是清歡 2026-03-03 | 4/200 |
|
|
[碩博家園] 2025屆雙非化工碩士畢業(yè),申博 +4 | 更多的是 2026-02-27 | 5/250 |
|
|
[考研] 材料328求調(diào)劑 +4 | 一個(gè)蘿卜02 2026-03-03 | 4/200 |
|
|
[考研] 267求調(diào)劑 +6 | 釣魚佬as 2026-03-02 | 6/300 |
|
|
[考研] 化工270求調(diào)劑 +10 | 什么名字qwq 2026-03-02 | 10/500 |
|
|
[考研] 284求調(diào)劑 +6 | 天下熯 2026-03-02 | 6/300 |
|
|
[考研] 268求調(diào)劑 +6 | 好運(yùn)連綿不絕 2026-03-02 | 6/300 |
|
|
[考研] 298求調(diào)劑 +7 | axyz3 2026-02-28 | 8/400 |
|
|
[考研] 298求調(diào)劑 +10 | 人間唯你是清歡 2026-02-28 | 14/700 |
|
|
[考研] 295求調(diào)劑。一志愿報(bào)考鄭州大學(xué)化學(xué)工藝學(xué)碩,總分295分 +8 | yl1 2026-03-02 | 9/450 |
|
|
[考研] 285求調(diào)劑 +9 | 滿頭大汗的學(xué)生 2026-02-28 | 9/450 |
|
|
[考研] 0856材料求調(diào)劑 +12 | hyf hyf hyf 2026-02-28 | 13/650 |
|
|
[考研] 材料調(diào)劑 +3 | 恒順自然 2026-03-02 | 3/150 |
|
|
[考研] 291 求調(diào)劑 +3 | 化工2026屆畢業(yè)?/a> 2026-03-02 | 3/150 |
|
|
[考研] 求調(diào)劑 +3 | 熬夜的貓頭鷹 2026-03-02 | 3/150 |
|
|
[考研] 264求調(diào)劑 +4 | 巴拉巴拉根556 2026-02-28 | 4/200 |
|
|
[基金申請(qǐng)]
|
Doma 2026-03-01 | 7/350 |
|
|
[考研] 272求調(diào)劑 +6 | 田智友 2026-02-28 | 6/300 |
|