Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: "stata" vs. "stata hidden"


From   "Sergiy Radyakin" <serjradyakin@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: "stata" vs. "stata hidden"
Date   Fri, 31 Oct 2008 17:27:27 -0400

And as a follow-up to the previous question: adding a stopbox
completely prevents changing the radio buttons state, why?

PROGRAM msg
BEGIN
        if IsLoaded {
          stopbox note "Message"
          put `".TestBox_dlg.main.ed_count.setvalue
`=`.TestBox_dlg.main.ed_count.value'+1'"'
          stata
        }
END

Note that the counter ticks, but the radio buttons do not change, even
though the event is fired.

Thank you, Sergiy Radyakin





On Fri, Oct 31, 2008 at 5:06 PM, Sergiy Radyakin <serjradyakin@gmail.com> wrote:
> Dear All,
>
> why does the following dialog work with "stata" and does not work with
> "stata hidden" in program msg?
> By "works" I mean the counter ticking when the radiobuttons have
> changed their value.
> It seems that Stata does not evaluate macros in the "hidden" mode and
> the counter stucks with a single quote
>
> Any hint is appreciated.
>
> Stata 9/10 for Win.
>
> Thank you,
>    Sergiy Radyakin
>
>
>
>
> /* BEGIN OF FILE: TestBox.dlg */
> VERSION 8.0
>
> INCLUDE _std_small
> INCLUDE header
>
> DEFINE ewd  180
> DEFINE esep +190
>
> DIALOG main, label("Test Stopbox") tabtitle("Main")
> BEGIN
>
>  RADIO    rb_first 10 10 100 ., label("first") first onclickon(program msg)
>  RADIO    rb_last  10 30 100 ., label("last")  last
>  EDIT     ed_count 10 50 100 ., default("1")
>
> END
>
> PROGRAM PREINIT
> BEGIN
>                 create BOOLEAN IsLoaded
>         IsLoaded.setfalse
> END
>
> PROGRAM POSTINIT
> BEGIN
>        IsLoaded.settrue
> END
>
> PROGRAM msg
> BEGIN
>        if IsLoaded {
>          put `".TestBox_dlg.main.ed_count.setvalue
> `=`.TestBox_dlg.main.ed_count.value'+1'"'
>          stata hidden
>        }
> END
>
> PROGRAM command
> BEGIN
>
> END
> /* END OF FILE: TestBox.dlg */
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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