问题在于WRITE_头函数:您调用了OPEN函数两次,第一次没有模式参数;路径应使用双反斜杠书写;CLOSE函数的参数也错误。
- (defun write_header ()
- (setq fname [s][color=red](open[/color][/s] "C:\[color=red]\[/color]edi\[color=red]\[/color]test.txt"[s][color=red])[/color][/s])
- (setq fdesc (open fname "w"))
- (write-line "po" fdesc)
- (write-line "oc" fdesc)
- (write-line "jobname" fdesc)
- (write-line "workorder" fdesc)
- (close [color=red]fdesc[/color])
- )
在取消事件中,我建议您终止对话框,而不是强制退出:
- (action_tile "cancel" "[color=red](done_dialog 0)[/color]")
顺便说一句,由于您重新定义了错误函数,一个好的编程实践是保留其原始状态,并在例程退出时将其还原。 |