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