0
我的程序的这一部分打开一个文件,下载到扫描仪上进行刷新。如果我刚刚关闭了文件选择窗口,我收到此错误消息 -如何检查tk_getOpenfile是否实际打开文件?
wrong # args: should be cksum ?-format string? -channel chan | -filename file | string
wrong # args: should be cksum ?-format string? -channel chan | -filename file | string
while executing
"::crc::cksum -file $file2program"
set file2program [tk_getOpenFile]
## determine chsum
set filechecksum1 [::crc::cksum -file $file2program]
set filechecksum [format %X [scan $filechecksum1 %d]]
.flashutility.messagearea insert end "Checksum for binary file = $filechecksum\n"
.flashutility.messagearea see end
set filesize [file size $file2program]
.flashutility.messagearea insert end "Size of the file to transfer is $filesize bytes\n"
.flashutility.messagearea see end
update