多了一行start_dialog
 - (defun dcl_contents()
- (if (> (setq dcl_id (load_dialog "contents")) 0) (progn
- (if (new_dialog "contents" dcl_id) (progn
- (start_list "klist")
- (mapcar 'add_list wordlist)
- (end_list)
- (action_tile "klist" "(sub_klist $value)")
- (action_tile "accept" "(ok_dia7a)(done_dialog 1)")
- (setq dd (start_dialog))
- )
- (princ "\n无法显示对话框!")
- )
- (unload_dialog dcl_id)
- )
- (princ "\n无法加载对话框!")
- )
- (if (= dd 1) (progn
- (setvar "cmdecho" 1)
- (command "text" pause pause 0 str)
- (setvar "cmdecho" 0)
- ))
- (princ)
- )
- (defun sub_klist(vvs)
- (set_tile "str" (nth (atoi vvs) wordlist))
- )
- (defun ok_dia7a()
- (setq str (get_tile "str"))
- )
|