| 查看: 1324 | 回复: 0 | |||
| 【悬赏金币】回答本帖问题,作者wangyikeco将赠送您 10 个金币 | |||
wangyikeco木虫 (正式写手)
newbie
|
[求助]
tcl/tk: expected integer but got ""
|
||
|
一个TCL/TK脚本昨天都运行的好好的,今天UBUNTU 20.4 LTS update后出现了expected integer but got ""这的问题。 # 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 {d} { global Wssys update; dirlist_focus $Wssys; $Wssys.c.d.f.f.li delete 0 end; update; dirselected_system $d } ######################################################################################## proc dirselected_system {d} {# 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} } |
» 猜你喜欢
自然科学基金委宣布启动申请书“瘦身提质”行动
已经有4人回复
投稿Elsevier的杂志(返修),总是在选择OA和subscription界面被踢皮球
已经有6人回复
中科院杭州医学所招收博士生一名(生物分析化学、药物递送)
已经有4人回复
求个博导看看
已经有18人回复
自荐读博
已经有6人回复
青基代表作,AAAI之类的A会的special track在国内认可度高吗?还是归为workshop之流?
已经有3人回复
上海工程技术大学【激光智能制造】课题组招收硕士
已经有6人回复
上海工程技术大学张培磊教授团队招收博士生
已经有4人回复
临港实验室与上科大联培博士招生1名
已经有9人回复
写了一篇“相变储能技术在冷库中应用”的论文,论文内容以实验为主,投什么期刊合适?
已经有6人回复







回复此楼