执行以下程序显示结果:can`t read "x",no such vuale
那位大虾帮忙看一下
proc Info {} {
set cvid [ leoGetWndCellViewId ]
set wndid [ leoGetwdWndId ]
set value [ lakerEnterPoint -handle $wndid -cv $cvid ]
regexp {\{(.*)\,(.*)\}} $value a x y
set aa [expr $x+$y]
set inf [gtDisplayAppDBox -name Inf \
-dboxBanner "Infor" \
-dialogType "InformationDialog" \
-defaultButton 1 \
-buttonLayout "Close" \
-dboxText "The value is $aa."\
-location {200,200}]
}
单独打印$value是正确的,但是如果加上$x和$y就不行了,还是会报"can`t read "x",no such value"
proc Info {} {
set cvid [ leoGetWndCellViewId ]
set wndid [ leoGetwdWndId ]
set value [ lakerEnterPoint -handle $wndid -cv &cvid ]
regexp {\{(.*)\,(.*)\}} $value a x y
# set aa [expr $x+$y]
set inf [gtDisplayAppDBox -name Inf \
-dboxBanner "Infor" \
-dialogType "InformationDialog" \
-defaultButton 1 \
-buttonLayout "Close" \
-dboxText "The value is $value."\ # $aa change into $value
-location {200,200}]
}