哎哟
无论如何,以防万一你还不明白。。我调整了你的代码作为参考
- (defun c:task ( )
- (vl-load-com)
- (setq listTaskstd (list "1" "2" "3" "4" "5"))
- (setq dcl (load_dialog "diastd.dcl"))
- (if not (new_dialog "Tasks" dcl) (exit))
- (start_list "listTaskstd")
- (mapcar 'add_list listTaskStd)
- (end_list)
- (action_tile "addTask" "(setq newTask $value) " )
- (action_tile "addButton" "
- (start_list listTaskstd)
- (mapcar 'add_list newTask )
- (end_list)
- "
- )
- (start_dialog)
- (unload_dialog dcl)
- )
- // now is dcl code
- Tasks : dialog
- {
- label = "My DCL" ;
- : boxed_row
- {
- : column
- {
- : list_box
- {
- key = "listTaskstd" ;
- width = 60 ;
- height = 15 ;
- fixed_width = true ;
- fixed_height = true ;
- multiple_select = false ;
- }
- }
- } //row
- : boxed_row
- {
- : edit_box
- {
- key = "addTask" ;
- edit_width = 60 ;
- }
- : button
- {
- label = "Add" ;
- key = "addButton" ;
- is_default = true ;
- alignment = left ;
- fixed_width = true;
- mnemonic = "Ä";
- }
- } // row add task
- : button
- {
- label = "OK";
- key = "accept";
- is_default = true;
- fixed_width = true;
- alignment = centered;
- }
- } // task
在未来。避免使用与键相同的变量名 |