Hi Lee,
In other words (lisp), something like this? :
(action_tile "SelButton" "(done_dialog 5)") ; and store the values of all tiles
(setq dlgRtn (start_dialog))
; (alert (vl-princ-to-string dlgRtn))
(if (= 5 dlgRtn)
(progn
(done_dialog)
(princ "\nSelect text objects: ")
(if (setq SS (ssget "_:L" (list (cons 0 "*TEXT"))))
(progn ; if SS, then change the selection associated values
(new_dialog "TextTest" dcl_id) ; recreate the dialog and set new tile values, before restarting it
(set_tile "SelPrompt" (vl-princ-to-string SS))
)
(new_dialog "TextTest" dcl_id) ; recreate the dialog
)
; reset the values of all tiles
(setq dlgRtn (start_dialog)) ; restart the dialog
); progn
); if
(cond
((= 1 dlgRtn) ; ok was pressed
(and RtnLst (setq RtnLst (reverse RtnLst))) ; this is assoc list of ( <key> . <value> ) - collect the results from the dialog
(alert (vl-princ-to-string RtnLst))
)
((= 0 dlgRtn) ; cancel was pressed
(setq RtnLst nil)
)
); cond
(done_dialog)
(unload_dialog dcl_id)
(vl-file-delete FpathWithFname)
I mean (english),
1. if the "SelButton" was pressed, just store all the keys and vals from the dialog into assoc list, and use return of (done_dialog n).
2. Check if n value was returned and prompt for SS, then create new dialog and populate all the tile values with the previous ones using set_tile
Now I feel that I've dropped myself into the deep waters with this question.
This method "works" except that the newly created dialog doesn't obtain the behavior of the "SelButton" - no possibility to be prompted again for SS.
So I think the wayaround for this is to define the whole thing as a subfunction / run it within a while loop.
Aside question:
Do you think that this is the proper policy: When ending(closing) the dialog to obtain all the keys and values from the dialog into one assoc list and continue the computations with lisp, or there is something else I'm missing?
BTW I'm still newbie into the DCL stuff, so I've just learned this:
; (done_dialog [int]) ; [int] - what value must be returned after that button is pressed and the dialog is closed