Statalist


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

st: "stata" vs. "stata hidden"


From   "Sergiy Radyakin" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: "stata" vs. "stata hidden"
Date   Fri, 31 Oct 2008 17:06:59 -0400

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/



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