这是我用来测试/学习revZip库的简单处理程序。 fld" XML"包含XML作为文本。 我无法看到错误......有什么想法吗?
command SaveIssue
put fld "XML" into tXML
ask file "Save as:" with "NewIssue.zip" as sheet; CheckResult the result
put it into tPath
revZipOpenArchive tPath, "write"; CheckResult the result
revZipAddItemWithData tPath, "issue.xml", tXML; CheckResult the result
revZipCloseArchive tPath; CheckResult the result
end SaveIssue
command CheckResult tResult
if tResult is not empty then
if tResult is "Cancel" then exit to top
answer "Error:" && tResult
exit to top
end if
end CheckResult
答案 0 :(得分:1)
我在旧论坛帖子中找到了答案。 revZip外部需要围绕变量名称的引号。有点奇怪,但是对这一行的改动修复了它:
revZipAddItemWithData tPath, "issue.xml", "tXML"