To improve the code that I've been working on, I am trying to cause ESC to go back to the menu.
(defun *error* ( errormsg ) (if (not (member errormsg '("Function cancelled" "quit / exit abort" "Cancel") ) ) (princ (strcat "\nError: " errormsg) ) (if ret (Label)) ) (princ) )
In this code, "Label" is the menu function that I'm using, and "ret" is a variable that has value of T except while user is using "Label" function. What I was intending to do is to come back to "Label" function whenever I press ESC unless I was already using it.
However, this part of the code will only work properly for the first time I pressed ESC. If you press it in anywhere for the second time, it will terminate the macro for good, and I would have to restart the command. When I observed with animated code, on the first time ESC was pressed, it will properly get "terminated" to "*error*" function. However, on the second time, it will immediately exit without calling "*error*".
Are there any way to prevent this from happening?
Another issue I'm troubling with is to format the spacing for this GUI. For these 4 edit_boxes, I'm trying to remove the space between label and the box by restricting height, but it doen't get closer than above. I am very new to DCl, and I don't really know any other ways.
Thank you in advance for those people who takes their time to help people like me.