Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: -db- suggestion


From   [email protected] (Alan Riley)
To   [email protected]
Subject   st: Re: -db- suggestion
Date   Wed, 29 Jan 2003 13:57:40 -0600

Roger Harbord ([email protected]) brought up several interesting
points about the new dialog boxes in Stata 8:
> At the moment in Stata 8.0 :
> 
> . db
> 
> - without any arguments gives an error.  Does anyone else think it would 
> be great if it brought up the last dialog box instead?

This is an interesting idea.  It raises the question of whether it
should bring up the last dialog box closed by a user, the last dialog
box used to submit a command by the user (i.e. not closed by using
the Cancel button), or the last dialog box opened by the user (which
might not be the same as the last one closed).  Such a feature is
something we could look at adding in the future.


> Alternatively, some way of stopping the dialog box closing when you click 
> 'OK' - I know X-Windows has pushpins that do this, but I think maybe in MS 
> Windows dialog boxes either always close on OK or always don't ?? - the 
> latter means you can easily end up with far too many dialog boxes around at 
> the same time  (anyone else used Genstat for Windows?).

As Nick Winter suggested, I believe you just want to use the Submit
button.  The only difference between the OK and Submit buttons is
that the OK button closes the dialog box after submitting the command.
If you want to make sure your command runs without problems before
closing the dialog box, just use the Submit button, then click Cancel
to dismiss the dialog after you see the command execute successfully.

In Nick's response to your original email, Nick also wrote
> A "Paste" addition -- which would put the command into the
> doeditor, rather than submitting it to stata directly, might be useful
> though.

While it is not quite what Nick asked for, there is an undocumented
setting which will tell the dialog system to place the command it
creates when the user presses "OK" or "Submit" into a global macro
rather than directly executing the command.  Type

   . set guixeqcmd off

and then try submitting a command from the dialog system.  The
command produced by the dialog box will be placed in the global
macro S_GUICMD.  The idea of other settings to direct Stata to
copy the command to other places such as the do-file editor is
a good one and is also something we will look into adding into
the future.


Alan
([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