Mark,
here's a quick edit of your file...
Please notice a couple of quick things
1.) I pulled the strcat out of your action_tile call because you don't really need it.
2.) I'm also pulled the (exit) call out of your "cancel" action_tile call, because I'm using the optional integer call on done_dialog. And that way I'm getting the same results without crashing out of the routine.
(defun DimTextOverRide (lst obj / *error* dcl_id str sel cur output start)
;; error function
(defun *error* (msg)
(if (not (member msg '("console break" "Function cancelled" "quit / exit abort")))
(princ (strcat "\nError: " msg))
) ; if
(princ)
) ; end error funtion
;load dialog
(setq dcl_id (load_dialog "dcl_popup_list.dcl"))
(if (not (new_dialog "dcl_popup_list" dcl_id)) (exit)) ;if
(setq str (vlax-get-property obj 'TextOverride))
(set_tile "curt" str)
(start_list "selections")
(mapcar 'add_list lst)
(end_list)
(if (setq pos (vl-position mst-last-sel lst))
(set_tile "selections" (itoa pos))
(set_tile "selections" "0")
)
(action_tile "selections" "(setq sel $value)")
(action_tile "accept"
"(setq sel (atoi (get_tile \"selections\")) cur (get_tile \"curt\")) (done_dialog 1)"
)
(action_tile "cancel" "(done_dialog 2)")
(setq start (start_dialog))
(unload_dialog dcl_id)
(cond
( (= start 1)
(if (/= cur str) ; edit box changed, so ignore the list box
(setq output cur)
(setq output (nth sel lst))
)
)
)
output
)
Darn it All!!!!! I was beat again by too fast typing coders!!!! AGGHHHH!!!
However, as you can see from above I agree with SM whole heartedly.