[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs

sm_cmd_hdr (SMIT Dialog Header) Object Class

A dialog header object is an sm_cmd_hdr object. A dialog header object is required for each dialog, and points to the dialog command option objects associated with the dialog.

Note: When coding an object in this object class, set unused empty strings to "" (double-quotation marks) and unused integer fields to 0.

The descriptors for the sm_cmd_hdr object class are:

id The ID or name of the object. The value of id is a string with a maximum length of 64 characters. The id field can be used as a fast path ID unless there is a selector associated with the dialog. IDs should be unique to your application and unique within your system.
option_id The id of the sm_cmd_opt objects (the dialog fields) to which this header refers. The value of option_id is a string with a maximum length of 64 characters.
has_name_select Specifies whether this screen must be preceded by a selector screen or a menu screen. Valid values are:
"" or "n" No; this is the default case.
"y" Yes; a selector precedes this object. This setting prevents the id of this object from being used as a fast path to the corresponding dialog screen.
name The text displayed as the title of the dialog screen. The value of name is a string with a maximum length of 1024 characters. The text describes the task performed by the dialog. The string can be formatted with embedded \n (newline) characters.
name_msg_file The file name (not the full path name) that is the Message Facility catalog for the string, name. The value of name_msg_file is a string with a maximum length of 1024 characters. Message catalogs required by an application program can be developed with the Message Facility.
name_msg_set The Message Facility set ID for the string, name. Set IDs can be used to indicate subsets of a single catalog. The value of name_msg_set is an integer.
name_msg_id The Message Facility ID for the string, name. Message IDs can be created by the message extractor tools owned by the Message Facility. The value of name_msg_id is an integer.
cmd_to_exec The initial part of the command string, which can be the command or the command and any fixed options that execute the task of the dialog. Other options are automatically appended through user interaction with the command option objects (sm_cmd_opt) associated with the dialog screen. The value of cmd_to_exec is a string with a maximum length of 1024 characters.
ask Defines whether or not the user is prompted to reconsider the choice to execute the task. Valid values are:
"" or "n" No; the user is not prompted for confirmation; the task is performed when the dialog is committed. This is the default setting for the ask descriptor.
"y" Yes; the user is prompted to confirm that the task be performed; the task is performed only after user confirmation.

Prompting the user for execution confirmation is especially useful prior to performance of deletion tasks, where the deleted resource is either difficult or impossible to recover, or when there is no displayable dialog associated with the task (when the ghost field is set to "y" ).

exec_mode Defines the handling of standard input, standard output, and the stderr file during task execution. The value of exec_mode is a string. Valid values are:
"" or "p" Pipe mode; the default setting for the exec_mode descriptor. The command executes with standard output and the stderr file redirected through pipes to SMIT. SMIT manages output from the command. The output is saved and is scrollable by the user after the task finishes running. While the task runs, output is scrolled as needed.
"n" No scroll pipe mode; works like the "p" mode, except that the output is not scrolled while the task runs. The first screen of output will be shown as it is generated and then remains there while the task runs. The output is saved and is scrollable by the user after the task finishes running.
"i" Inherit mode; the command executes with standard input, standard output, and the stderr file inherited by the child process in which the task runs. This mode gives input and output control to the executed command. This value is intended for commands that need to write to the /dev/tty file, perform cursor addressing, or use libcur or libcurses library operations.
"e" Exit/exec mode; causes SMIT to run (do an execl subroutine call on) the specified command string in the current process, which effectively terminates SMIT. This is intended for running commands that are incompatible with SMIT (which change display modes or font sizes, for instance). A warning is given that SMIT will exit before running the command.
"E" Same as "e", but no warning is given before exiting SMIT.
"P" , "N" or "I" Backup modes; work like the corresponding "p" , "n" , and "i" modes, except that if the cmd_to_exec command is run and returns with an exit value of 0 , SMIT backs up to the nearest preceding menu (if any), or to the nearest preceding selector (if any), or to the command line.
ghost Indicates if the normally displayed dialog should not be shown. The value of ghost is a string. Valid values are:
"" or "n" No; the dialog associated with the task is displayed. This is the default setting.
"y" Yes; the dialog associated with the task is not displayed because no further information is required from the user. The command specified in the cmd_to_exec descriptor is executed as soon as the user selects the task.
cmd_to_discover The command string used to discover the default or current values of the object being manipulated. The value of cmd_to_discover is a string with a maximum length of 1024 characters. The command is executed before the dialog is displayed, and its output is retrieved. Output of the command must be in colon format.
cmd_to_discover_postfix The postfix to interpret and add to the command string in the cmd_to_discover field. The value of cmd_to_discover_postfix is a string with a maximum length of 1024 characters.
help_msg_id Specifies a Message Facility message set number and message ID number with a comma as the separator or a numeric string equal to a SMIT identifier tag.
help_msg_loc The file name sent as a parameter to the man command for retrieval of help text, or the file name of a file containing help text. The value of help_msg_loc is a string with a maximum length of 1024 characters.
help_msg_base The fully qualified path name of a library that SMIT reads for the file names associated with the correct book.
help_msg_book Contains the string with the value of the name file contained in the file library indicated by help_msg_base.

For information on retrieving SMIT help using the help_msg_id , help_msg_loc , help_msg_base , and help_msg_book fields, see the man pages, softcopy libraries, and message catalog methods located in "Creating SMIT Help Information for a New Task".

Related Information

The smit command.


[ Previous | Next | Contents | Glossary | Home | Search ]