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

Re: st: can not be found

From   Alan Riley <>
Subject   Re: st: can not be found
Date   Tue, 21 Aug 2007 17:34:18 -0500

Sergiy Radyakin <> would like to automatically
add an item to Stata's menu after a new package is installed, and
is wondering if one way to accomplish this is to automatically install
a file:

> thank you for your confirmation of a bug. Could you please advise on
> how can I add an item to the menu automatically after a package is
> installed without having a user to run an ado file first? I planned to
> deliver a file which will add an item the next time Stata
> is launched.

Sergiy then went on to list reasons why automatically installing
a might be a bad idea:

> But this seems to be a bad idea because:
> 1. this file might already exist
> 2. there might be a superior in the priority list (see manual)
> 3. Stata must be restarted

We here at StataCorp agree.  It would be a bad idea to automatically
install a file on a user's system, and we strongly recommend
against it.  There is just too much potential for confusion due
to a user already having a (which might then no longer
be executed), or due to a user not knowing they had a installed
automatically at some point and then wondering why a they added
later was not working.

Sergiy is right that Stata should have a way of allowing users to have
things added to Stata's menu system when a new package is installed
which would benefit from this, but we have not yet provided such a
method.  Sergiy's idea of adding to the package file syntax for this
is interesting, and is one possibility for a way we could achieve

> Alternatively, would it be possible to add a keyword "m" to the
> package file syntax for "Menu item", e.g.:
> m "stUser" "Descriptive" "Descriptive Command" "descrcom"
> might create "Descriptive" as a submenu of the "User" menu (if not
> created already) and add a call to descrcom.ado labelled "Descriptive
> Command"

However, I would not expect to see such functionality soon, so for
now our advice would be for Sergiy to let users know what they could
add to their own (rather than automatically installing one
for them) so that the menus he would like added to their Stata would
be populated upon the startup of Stata.


*   For searches and help try:

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