I have writing a dialogue box for a command called
(see documentation for context). The only relevant context for this question is that this command requires a settings file and the dialogue box will help a user set up that file.
Before opening the dialogue box, the command looks if the settings file exist, and if it does, it will prepopulate the dialogue box with that is already in the file. I have been able to generate the dialogue box, but I want to define a PREINIT or POSTINIT program has described in section 5.6 in this Stata manual: https://www.stata.com/manuals13/pdia...logprogramming. However, I have tried to defined it in all different ways I can imagine, but I always get a 198 error and I have not been able to find some more meaningful error message when running the command with tracing turned on.
I know a reproducible example is almost always needed to give specific advice. But I am not sure how to best do so as without making it too complex. Happy to make an attempt if no one is able to point me to an example or other resource where I can see a general example of how this is done. For what it is worth, here is the current version of the dlg file, but I probably would have to give more context for the details to work: https://github.com/worldbank/repkit/...do/reproot.dlg. On line 84 I am trying to define the POSTINIT program. I am aware that the program is empty in that code, but I have tried with some basic code and I still get the same error. If I change
to
but leave the program empty, I do not get a 198 error. But that might be different as a POSTINIT command is executed automatically.
I have searched for other dlg files to see if I can find any example of POSTINI usage, but have not found any. So if anyone has an example like that I can look at to start with that might be the best option before I am trying to make a reproducible example.
Code:
reproot
Before opening the dialogue box, the command looks if the settings file exist, and if it does, it will prepopulate the dialogue box with that is already in the file. I have been able to generate the dialogue box, but I want to define a PREINIT or POSTINIT program has described in section 5.6 in this Stata manual: https://www.stata.com/manuals13/pdia...logprogramming. However, I have tried to defined it in all different ways I can imagine, but I always get a 198 error and I have not been able to find some more meaningful error message when running the command with tracing turned on.
I know a reproducible example is almost always needed to give specific advice. But I am not sure how to best do so as without making it too complex. Happy to make an attempt if no one is able to point me to an example or other resource where I can see a general example of how this is done. For what it is worth, here is the current version of the dlg file, but I probably would have to give more context for the details to work: https://github.com/worldbank/repkit/...do/reproot.dlg. On line 84 I am trying to define the POSTINIT program. I am aware that the program is empty in that code, but I have tried with some basic code and I still get the same error. If I change
Code:
POSTINIT_PROGRAM test
Code:
PROGRAM test
I have searched for other dlg files to see if I can find any example of POSTINI usage, but have not found any. So if anyone has an example like that I can look at to start with that might be the best option before I am trying to make a reproducible example.
Comment