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

st: Clickable examples in ado help files

From   "Mark Schaffer" <>
Subject   st: Clickable examples in ado help files
Date   Thu, 18 Sep 2003 18:20:49 +0100

Dear Statalisters:

A couple of questions for you:

1.  What do you think of clickable examples in a command help file?  
That is, if the example in the help file is

ivreg2 y1 x1 x2 (y2 y3 = z1 z2 z3), gmm ffirst

and you click on this line, then the command is executed.  It's 
possible to do this in smcl with {stata <command> : <text of the 
command> } , but is it worth it?

2.  This would work only if the dataset that the example uses is in 
memory.  I tried to put a clickable command to load the data in the 
help file with the command  

{stata use ""; : . stata 

where the part following the : separator is the clickable text to 
display to the user, and the "" are used because the URL contains a :.

Unfortunately, what gets displayed is

//" : . use

(all on one line)

and when I click on it, Stata tries to execute the command

use "http

with the following result:

. use "http
file http.dta not found

What's happening is that Stata is ignoring the "" and treats the 
first : in the URL as the separator for the smcl command.

I'm using Stata 7 (but hoping to update soon....).  Does this happen 
in Stata 8 too?  Any ideas on a Stata 7 (or 8) workaround?


Prof. Mark E. Schaffer
Centre for Economic Reform and Transformation
Department of Economics
School of Management & Languages
Heriot-Watt University, Edinburgh EH14 4AS  UK
44-131-451-3494 direct
44-131-451-3008 fax
44-131-451-3485 CERT administrator
*   For searches and help try:

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