|Title||Sharing dialogs (part 1) — Basic terminology and overview|
|Author||T. J. Steichen|
This is a four-part FAQ. This first part provides an introduction, some basic dialog terminology, and a general overview. The second part discusses guidelines for writing dialog-box programs. The third section includes a discussion on guidelines for adding to the Stata menu system. The fourth and final part outlines guidelines for sharing submenus and dialog boxes.
Stata Version 8 introduced a graphical user interface (GUI) that gives the user a visual, point-and-click, menu-based way to select Stata commands to be run and provides dialog boxes to specify the details about those commands. Consistent with the open design of Stata, users can write their own dialogs and can attach them to a portion of the built-in Stata menu system. Menu items and dialog boxes prepared in this way are virtually identical to the menus and dialog boxes supplied with Stata for built-in commands.
A dialog box is a window accessed via the menu system or the db
command that provides an easy, visual, point-and-click way to specify the
details about the Stata command you wish to run. Dialog boxes are another
essential element of the new GUI.
A dialog-box program (formally called a dialog resource file and often casually referred to as a dialog) allows the author to define the appearance of a dialog box, to specify how the controls of the dialog box react when the user fills in the fields (such as the hiding or disabling of specific areas), and to specify the ultimate action that is to be taken (such as running a Stata command) when the user clicks OK or Submit. A dialog-box program is stored in a file with extension .dlg.
A menu, or more specifically a pull-down menu, is the element of Stata 8's new graphical user interface (GUI) that allows the user to access a dialog box to specify and submit details about a Stata command you wish to run. The only Stata menu that can be modified to hold community-contributed dialog boxes is the User menu.
The first step is to write your dialog box program. For more information on this topic, visit Sharing dialogs (part 2) — Dialog-box programs.
The second step is to determine where your program belongs in the Stata menu system and to specify how it can be added by users. For more information, visit Sharing dialogs (part 3) — Stata menus.
The third step is to share your code by inclusion in the Stata Journal or the SSC or by posting your package on some other website. We have suggested some ground rules for cooperating with others. For more information, visit Sharing dialogs (part 4) — Submenus and dialogs.
Each of the next sections of this FAQ discusses a key recommendation. A summary of each recommendation is listed below.