DCL language changed
Dears,When I try to use the new version of Brics 8.1.18 build 10391, my lisp routines with DCL is not working like at old version. The layout and functions are working diferent and cause bugs.What was change?It is happend with someone more?Thank you,Escuse me my poor english, I am Brazilian.Leandro
Comments
-
The DCL engine has indeed been rewritten from scratch. In preparation of being able to create the native Linux version of Bricscad, the dialog items generated when interpreting the DCL code are now WxWidgets controls. We did the best we could to avoid regressions, but unfortunately some issues have been reported, which we are currently fixing with priority. Could you please file a Support Request and describe the problems you experience, we will promptly fix them. It would be very helpful to attach (part of) the code concerned. Sincere thanks.Hans De Backer
0 -
Does the new DCL engine come with any enhanced or new tile attributes? I'm thinking specifically it would be nice to add text labels to the new column headers in a tabbed list box.
0 -
We have also a lot of problems with the new DCL engine.For us it's very important that all old DCLs looks and works like in AutoCAD or in older BRICSCAD.We were nearly ready to deliver our application with BRICSCAD 8. But now we can't because of the new DCL engine.(I reported this in SR 14925)
0 -
As a result of your support request we are currently working on making the new DCL engine more tolerant for conflicting input. Thanks for your feedback.
0 -
I've had a lot of problems as well. But I haven't changed any code and the latest beta version is making good progress.Thanks, Steve MarcotteSeptiCAD.com
0 -
I am having the same sorts of problems. I have a short lisp and dcl which works fine in Acad, but I have ported to Bricscad and it seems to have faltered.
The DCL I basically plagiarised from JefferySanders.com web tutorial on DCL, so I know only enough to get myself into trouble. Probably the same when it comes to lisp too.
The problem is that the drop down list in the dialogue lists only "Select one . . . " ( I have shortened the list and changed the names for readability) and then generates an error saying something like "Expected number near [*]
Can anyone help?
Snippets attached:
DCL FILE
ridialogue : dialog {
key = "Title";
label = "";//Title$ from lsp file
initial_focus = "List1";
spacer;
: row {//<
fixed_width = true;
: column {
width = 17;
fixed_width = true;
spacer;
: text {
key = "Text1";
label = "";//Text1$ from lsp file
}
}
: popup_list {
key = "List1";//Value1$ from lsp file
width = 55;
fixed_width = true;
}
}//>
spacer;
ok_only;
}//ridialogueLISP
(defun set_tile_list (KeyName$ ListName Selected / Item)
(start_list KeyName$ 3)
(mapcar 'add_list ListName)
(end_list)
(foreach Item (if (listp Selected) Selected (list Selected))
(if (member Item ListName)
(set_tile KeyName$ (itoa (- (length ListName) (length (member Item ListName)))))
);if
);foreach
);set_tile_list
(defun set_other_list (SentList$ SentVar$ / AddOther Other$ SubList SubVar$)
(setq SubList (eval (read SentList$))
SubVar$ (eval (read SentVar$))
);setq
(if (= (nth (atoi $value) SubList) "")
(setq $value (itoa (- (length SubList)(length (member SubVar$ SubList)))))
);if
(if (= (nth (atoi $value) SubList) "Other")
(progn
(if (setq Other$ (edit_value "Enter Other Value" SubVar$))
(setq Other$ (NoSpaces Other$))
(setq Other$ "")
);if
(if (= (strcase Other$) "OTHER") (setq Other$ ""))
(if (/= Other$ "")
(progn
(setq AddOther t)
(foreach Item SubList
(if (= (strcase Other$) (strcase Item))
(setq $value (itoa (- (length SubList)(length (member Item SubList))))
AddOther nil)
);if
);foreach
(if AddOther
(setq SubList (insert_nth (- (length SubList) 2) Other$ SubList)
$value (itoa (- (length SubList)(length (member Other$ SubList)))))
);if
);progn
(setq $value (itoa (- (length SubList)(length (member SubVar$ SubList)))))
);if
);progn
);if
(setq SubVar$ (nth (atoi $value) SubList))
(start_list $key) (mapcar 'add_list SubList)(end_list)
(set_tile $key $value)
(set (read SentList$) SubList)
(set (read SentVar$) SubVar$)
(princ)
);set_other_list(setq List1 (list "Select one ..." "First list item" "Second list item") )
; Load Dialog
(setq Dcl_Id% (load_dialog "ridialogue.dcl"))
(new_dialog "ridialogue" Dcl_Id%)
; Set Dialog Initial Settings
(set_tile "Title" "Choose from the list")
(set_tile "Text1" "List of things")
(set_tile_list "List1" List1 Value1$);*Included
; Dialog Actions
(action_tile "List1" "(set_other_list \"List1\" \"Value1$\")");*Included
(setq Return# (start_dialog))
; Unload Dialog
(unload_dialog Dcl_Id%)
(setq typ 1)0 -
@ Todd McCutcheon:
1.
You have a key = "List1" and a variable List1. This causes a conflict in BC10 (tested on 10.1.7 trial). Renaming the key to e.g. key = "keyList1" and changing the lisp accordingly seems to solve the problem. With my limited knowledge of dcl I would consider this a bug.2.
After renaming the key another problem pops up. Maybe your snippets are incomplete?0 -
Roy,
Thanks very much. I had tried messing with that and I now have the variable named differently. It has not fixed the problem however. I have found that if I click away from Bricscad, say to the second screen desktop, or alt-tab switch to another application, then try to pick from the list, it works.
Seems like a bug to me. It is not a huge problem but does make using it rather time consuming.
I would post the whole lot up here, but worry a little about giving what is a very handy routine away to competition and it is the basis for a larger suite of functions based upon the same code.
Can I perhaps email you the whole lisp to have a look at without it going into the forum? Just a thought.
Todd
0