Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: dialog programming question


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   Re: st: dialog programming question
Date   Thu, 22 Jun 2006 14:43:29 -0400

"James Hassell, StataCorp" <[email protected]> wrote:

Michael may be able to use a PREINIT or POSTINIT script from within the dialog
to do what he wants. The idea is not to issue a Reset, but to have the
dialog initialize itself with the correct values at the appropriate time.
For more information on PREINIT and POSTINIT, see -help dialog- and
take a look at section 5.6 Special scripts and programs.
I don't think this will help. I'm giving the user the option of filling out an edit control with the name of an analysis, defined as a specific group of about 15 different settings that the dialog box allows them to select. When they type in a named group of settings and click a button control, the dialog launches a program that calls a Stata ado that looks up the associated values for these other settings in a Stata dataset and puts them into global macros to be used as defaults for all of the other controls in the dialog. This all works fine in terms of the call to the Stata ado and the loading of the values into global macros.

The problem is that the values shown in the dialog controls do not change until the user clicks the reset button. I just really need the ability to refresh the dialog box somehow. I can't see how the PREINIT or POSTINIT can help. I was hoping there was a function I could call. I was thinking of trying to disable and then re-enable controls to see if that makes them update the default value. Maybe I could have the dialog box close itself down and then re-launch itself? Any other ideas?

Michael Blasnik
[email protected]


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index