求助 为何此程序中start_dialog不能取得done_dialog的返回值?
(defun c:test (/ dcl_id std folderlist select_num)(setq dcl_id (load_dialog "c:\\temp.dcl"))
(if (< dcl_id 0)(exit))
(if (not (new_dialog "main_dlg" dcl_id))(exit))
(setq folderlist (list "ab" "cd" "ef" "gh"))
(start_list "list")
(mapcar 'add_list folderlist)
(end_list)
(set_tile "list" "0")
(action_tile "list" "(setq select_num (atoi $value))")
(action_tile "accept" "(done_dialog 1)")
(action_tile "cancel" "(done_dialog 0)")
(setq sdt (start_dialog))
(unload_dialog dcl_id)
(if (> std 0) (princ (nth select_num folderlist)))
(princ)
)
调试时发现(setq sdt (start_dialog))后 std为nil
求各位大侠帮忙看一下
你将std设置成了局部变量,当然查得其值为nil 回复 自贡黄明儒 的帖子
多谢楼上的提醒 我敲错了一个变量改为(setq std (start_dialog))就可以了
页:
[1]