Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to create a dynamic sub-dialog, where depending on selections in the first, different options are shown.
Given that this sub-dialog would need to work with roughly 15 different use cases, I tried to create one that would self define based on a list of Strings corresponding to the tiles. Everything seems to work, except for the action_tile line. It keeps getting tripped up on the very first (read x) according to the debugger. As is, it crashes any time a selection is made in a popup_list.
(setq tiles (list "A" "B" "C" "D" "E" "F" )))
(setq s (open "C:\\TEMP\\jtest2.dcl" "w"))
(write-line "Test : dialog{ label = \"Test\"\;" s)
(foreach x tiles
(write-line (strcat ": popup_list {edit_width = 15\; key = " x "\; label = " x "\; }") s)
)
(write-line "ok_cancel\;}" s)
(close s)
.....
(foreach x tiles
(or (eval (read (strcat "*" x "*"))) (set (read (strcat "*" x "*")) "0"))
(setq sqlString (strcat "SELECT DISTINCT " x " FROM " table ";"))
(UpdateList x (set (read (strcat "" x "list")) (cons "" (cdr (mapcar 'car (dsql_query mydb sqlString))))))
(action_tile x (strcat "(set (read x) (nth (atoi (set (read (strcat \"*\" x \"*\")) $value)) (read (strcat x \"list\"))))"))
);foreach
Any advice or a different way to approach this? I would like to avoid needing to preset 15 different dialog boxes.
Thanks
Solved! Go to Solution.