Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I'm having some issues with a popup function that I'm using. I have a main function TPop (the current main function is just a test main function) that calls popup2 and popup2 is suppose to return the selected ctb file and print it to the command line. But it seems that test is empty.
(defun C:TPop() (setq test (popup2)) (princ test) ) (defun POPUP2 () (setq rlist (vl-remove-if '(lambda (x) (or (vl-string-search ".stb" x) (vl-string-search ".lnk" x)) ) (vl-directory-files (getenv "PrinterStyleSheetDir") nil 1)) dcl_id (load_dialog "popup2.dcl") ; call the dcl file and asign to a var. ) (if (not (new_dialog "popup" dcl_id)) ; if statement if dcl is not found. goodthing to have. (exit) ) (start_list "rating") (mapcar 'add_list rlist) (end_list) (if #val (set_tile "rating" (itoa (setq val #val))) ; itoa convert int to string (set_tile "rating" (itoa (setq val 0))) );if (action_tile "rating" "(setq val (atoi $value))") (action_tile "accept" "(setq #val val)(done_dialog 1)") (action_tile "cancel" "(done_dialog 0)") (start_dialog) (unload_dialog dcl_id) (if userclick (progn (setq val (fix val)) (setq val (nth val rlist)) (princ val) ) ) (princ) )
Solved! Go to Solution.