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

st: RE: Re: -db- suggestion


From   "David Moore" <[email protected]>
To   [email protected]
Subject   st: RE: Re: -db- suggestion
Date   Wed, 29 Jan 2003 13:38:26 -0800

The best model for this that I have run across is in SPSS's stat package.
If the folks at Stata are not familiar with its "personality," they owe it
to themselves to take a look.  Briefly, SPSS (which began life as a
completely command driven app and still has capabilities that cannot be
accessed via dialog boxes) uses dialog boxes that contain a
submit/paste/cancel trio of buttons; clicking on any of these dismisses the
dialog box; regardless of which button you click, the dialog box always
remembers all of its control's values; any time a dialog box reappears, the
controls show you the values you last input; a journal file maintains a
running record of every command submitted (whether or not it originated from
a dialog box), which you can open in any text editor; the output window also
can be asked to record the commands.  All of these features provide a
tremendous amount of flexibility.  Note that these are not features that you
have to remember to turn off and on, for the most part, but you use global
settings to control how they look and feel.

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Alan Riley
Sent: Wednesday, January 29, 2003 11:58 AM
To: [email protected]
Subject: st: Re: -db- suggestion


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/

*
*   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