> Having read the link provided below by Nick Cox, I am slightly confused.
> There is an entry for "Adding an editor to your menu system" which says to
> add the following line to profile.do (w/ adjustments for your system, of
> course):
>
> qui window menu append string "Edit" "&P Pfe" "winexec \program
> files\pfe\pfe32.exe"
> Can you use a similar statement on Mac OS X (Jaguar)? If so, what would
> replace "winexec" in this statement?
Yes, you can use -winexec- but read more. Also, the window menu command
is different which I'll mention later.
> My confusion arises b/c under the Macintosh Editors section, it says:
> Unfortunately, the Stata commands that permit you to communicate with the
> operating system (i.e., shell, xshell and winexec) are not available on the
> Macintosh. Thus, in order to switch to an external editor easily from within
This statement is no longer true because of Stata 8 (see [R] Shell). -shell-
and -winexec- are both available under Mac OS X with a limitation.
The limitation is that only Mach-O native applications may be launched this
way, not CFM applications. I won't bore you with what the difference is but
how can you tell if the application you wish to launch is a CFM or Mach-O
application? From an OS X command line such as one you'd find while running
the Terminal application, type (for example)
file /Applications/Stata/StataSE
If it responds "Mach-O executable PPC", you can launch it using -winexec-. If
instead it responds "PEF binary", it is a CFM application and may not be
launched by -winexec-.
> I am afraid I am not tech-savvy enough to understand if this is referring to
> the same capability. As I understand it, the addition to profile.do above
Oh, it gets much worse. Let's try the TextEdit application located in the
/Applications directory. If from the Terminal you type
file /Applications/TextEdit
you'll get the response "/Applications/TextEdit: can't stat
`/Applications/TextEdit' (No such file or directory)."
That's because the TextEdit application is what's known as a "bundle" in OS X
lingo. Even though you see the application TextEdit from the Finder, it's
really a directory called TextEdit.app that contains a bunch of files that
make up the application. The actual executable is buried somewhere in there.