明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1752|回复: 2

求助 为何此程序中start_dialog不能取得done_dialog的返回值?

[复制链接]
发表于 2011-7-15 16:43:46 | 显示全部楼层 |阅读模式
(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
求各位大侠帮忙看一下

发表于 2011-7-15 16:51:51 | 显示全部楼层
你将std设置成了局部变量,当然查得其值为nil
 楼主| 发表于 2011-7-16 08:48:17 | 显示全部楼层
回复 自贡黄明儒 的帖子

多谢楼上的提醒 我敲错了一个变量  改为(setq std (start_dialog))就可以了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2025-6-11 06:10 , Processed in 0.164093 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表