Hi everyone !
I've made some research to figure out how to create a Dialog for reports. I found a tutorial on the ariscommunity website from Volker Eckardt.
However, some details are still unclear to me and I'll appreciate some help.
The part I didn't understand was the following :
function userdlg ()
{
// Variable for the user dialog definition
var userdialog = Dialogs.createNewDialogTemplate(0, 0, 440, 100, sScriptName);
// define the layout
userdialog.Text(60, 40, 400, 15, getString("DLG_MAIN_MESSAGE"));
userdialog.CheckBox(60,60, 250, 15, getString("DLG_SHOW_NOT_MAINTAINED_ATTRIBUTES"), "DLG_SHOW_NOT_MAINTAINED_ATTR");
userdialog.CheckBox(60,80, 300, 15, getString("DLG_USE_FIXED_OUTPUT_FILENAME"), "DLG_USE_FIXED_OUTPUT_FILENAME");
userdialog.Text(60, 150, 400, 15, getString("DLG_HINT_OUTPUT_FONT_SIZE"));
userdialog.ComboBox(60,170, 150, 15, aOutputFontSizeList, "DLG_OUTPUT_FONT_SIZE");
}
Now my misunderstanding goes as follows.
For example :
userdialog.Text(60, 40, 400, 15, getString("DLG_MAIN_MESSAGE"));
If I got this right, the underlined line should get a string that is stored under the name "DLG_MAIN_MESSAGE". So for example , getString("DLG_MAIN_MESSAGE" will return a string such as "please , select one or more options" or something like that and will display it in the dialog.
If so, then my main question is, where is the string "please , select one or more options" stored under the string "DLG_MAIN_MESSAGE" ?
The same goes for all the other lines.
I uploaded the full code (from the tutorial I found).
I will really appreciate some help on this.
Thank you !
The Short answer is: These variables are entries in a string table.
The longer explanation is:
Your code snippet appears to be from Part 6 of Werner's Scripting series, here: https://www.ariscommunity.com/users/volker-eckardt/2010-05-12-aris-scripting-tutorial-part-5-more-object-options-and-cu…
The explanation about how to create, manipulate and use entries in a string table are contained in Part 5 of the series, here: https://www.ariscommunity.com/users/volker-eckardt/2010-05-10-aris-scripting-tutorial-part-5-object-attributes-all-outp…
Werner's entire series on scripting is, IMHO, worth a read.
Hope this helps.
Hi Bruce, thank you for your answer.
Indeed, the code snippets are from Volker's tutorial, I already looked at the tutorial part 6 but not part 5 where he explains about String tables. I thought that tutorial 5 and 6 are two different tutorials , but apparently , each one is based on the previous tutorial. I gave a look thanks to you and it makes more sense now :)
Thank you !