明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 923|回复: 3

[求助]請幫我看看哪不對

[复制链接]
发表于 2008-9-11 17:23:00 | 显示全部楼层 |阅读模式
不好意思,新手,剛貼錯了。 你好。做了個子對話框,結果總不能達到想要的效果,你能幫我看一下哪錯了嗎? 想通過子對話框選擇編輯框里的内容,可是value始終等於1。 ------------------------------ list1:dialog{ :button{ label="選択"; key="elect"; } :edit_box{ label="記入"; key="list_t1"; edit_width=15; } ok_cancel; } ----------------------- list2:dialog{ :list_box{ label="list test"; key="list_t2"; edit_width=30; } ok_cancel; } ---------------------------------------- (defun c:list1() (setq electlist ' ("list0" "list1" "list2" "list3" "list4")) (setq dcl_id (load_dialog "list1")) (new_dialog "list1" dcl_id) (set_tile "list_t1" "list0") (action_tile "elect" "(sub_dcl)") (start_dialog) (prin1) ) (defun sub_dcl() (setq sub_dcl_id (load_dialog "list2")) (new_dialog "list2" sub_dcl_id) (start_list "list_t2") (mapcar ' add_list electlist) (end_list) (action_tile "accept" "(setq mid (nth (atoi $value) electlist)) (done_dialog)") (start_dialog) (set_tile "list_t1" mid) )
发表于 2008-9-11 17:59:00 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2008-9-11 20:25:00 | 显示全部楼层
  1. (defun c:list1 ()
  2. (setq electlist '("list0" "list1" "list2" "list3" "list4"))
  3. (setq dcl_id (load_dialog "list1"))
  4. (new_dialog "list1" dcl_id)
  5. (set_tile "list_t1" "list0")
  6. (action_tile "elect" "(sub_dcl)")
  7. (start_dialog)
  8. (unload_dialog dcl_id)
  9. (prin1)
  10. )
  11. (defun sub_dcl ()
  12. (setq sub_dcl_id (load_dialog "list2"))
  13. (new_dialog "list2" sub_dcl_id)
  14. (start_list "list_t2")
  15. (mapcar 'add_list electlist)
  16. (end_list)
  17. (action_tile "accept" "(setq mid (nth (atoi (get_tile "list_t2")) electlist)) (done_dialog)")
  18. (start_dialog)
  19. (unload_dialog sub_dcl_id)
  20. (set_tile "list_t1" mid)
  21. )
 楼主| 发表于 2008-9-12 09:02:00 | 显示全部楼层

非常謝謝版主。

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-26 04:44 , Processed in 0.165133 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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