明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1721|回复: 2

帮忙看一下这个程序错在哪里?谢谢!

[复制链接]
发表于 2003-7-23 15:00:00 | 显示全部楼层 |阅读模式


大家帮忙看看
DCL:

test:dialog{
  :edit_box{label = "Enter"; key="edit1";}
  ok_cancel;
}

LSP:

(setq a (list "Hello"))
(defun c:test()
(setq sdt 0)
(setq filename(getfiled "请选择DCL文件:" "e:/" "dcl" 8))
(setq id (load_dialog filename))
(if(< id 0)(exit))
(if (not (new_dialog "test" id))(exit))
(set_tile "edit1" (car a))
(action_tile "accept" "(done_dialog 1)(setq a (list (get_tile \"edit1\")))")
(action_tile "cancel" "(done_dialog -1)")
(setq sdt(start_dialog))
(unload_dialog id)
(princ)
)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2003-7-23 16:21:00 | 显示全部楼层
这样
(action_tile "accept" "(setq a (list (get_tile \"edit1\"))) (done_dialog 1)")

,不好意思,上次写的漏了结束对话框了。
 楼主| 发表于 2003-7-24 09:36:00 | 显示全部楼层
谢谢了,程序可以了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-2-25 12:18 , Processed in 0.186695 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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