I am trying to locate all of the help data in one lsp file, however I have created a single function to write the end (prefix if you will) of all my DCL's in that same lsp, not the ones that call the individual dialogs. There is also a function to insert a program ICON/AVATAR image button that host the "avatar" and "help" action_tiles, I am however trying to come up with a scheme to recognize where the "action_tiles" are being called from, to be able to individualize the "avatar" and "help"action_ tiles.
File "A" has 2-functions, one to create the DCL prefixes, and another one to load the "image_tile" and "action_tiles" for "avatar" and "help" buttons.
All other files (20+) contain individual dialog functions, most contain multiple dialogs.
I would like to be able to recognize where the "avatar" and "help" calls are coming from without the need to update all of the load_dialog locations.
I know this may sound a bit odd, but it has eliminated quite a few lines of code, and will allow me to edit all "help" text in one file.
Here is what my prefix "box" look like;
(defun dcl
-sig
( typ
/ txt txt1
) txt
((= typ 1)"\n ok_cancel_help_errtile;" )
((= typ 2)"\n ok_cancel;")
((= typ 3)"\n ok_cancel_err;")
((= typ 4)"\n ok_only;")
((= typ 5)"\n ok_cancel_help;")
((= typ 6)"\n ok_cancel_help_info;")
((= typ 7)"\n cancel_button;")
((= typ 8)"\n cancel_button;\n errtile;")
((= typ 9)
"\n : row { "
"\n : spacer { width = 1.5 ; } "
"\n : button { label = \"Accept\" ; key = \"accept\"; width = 8; fixed_width = true; }"
"\n : button { label = \"Edit Design Data\"; key = \"resize\"; width = 9; fixed_width = true; }"
"\n : button { label = \"Cancel\" ; key = \"cancel\"; width = 8; fixed_width = true; is_cancel = true; }"
"\n : spacer { width = 1.5 ; } "
"\n }"
"\n : errtile { width= 50; alignment = centered; }"
)
)
)
txt1
"\n : boxed_row { "
"\n : column { "
txt
"\n : text { label = \""(getenv "SA_App_Name")"\"; alignment = centered;}" "\n }"
"\n : column { width = 8.5 ; fixed_width = true;"
"\n : image_button { key = \"avatar\" ; width = 3.8; color = -15; }"
"\n }"
"\n }"
)
)
txt1
);defun (setq txte(dcl-sig 1))