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

sm_name_hdr (SMIT Selector Header) Object Class

A selector screen is specified by two objects: an sm_name_hdr object that specifies the screen title and other information, and an sm_cmd_opt object that specifies what type of data item is to be obtained.

Note: When coding an object in this object class, set unused empty strings to "" (double-quotation marks) and unused integer fields to 0 .
In a SMIT Selector Header screen ( sm_name_hdr) with type = "c", if you specify a value using a : (colon), (for example, tty:0), SMIT inserts a #! (pound sign, exclamation point) in front of the : to signify that the : is not a field separator. SMIT removes the #! after parsing the rest of the value, before passing it to the cmd_to_classify descriptor. To make any further additions to the cmd_to_classify descriptor, reinsert the #! in front of the :

The descriptors for the sm_name_hdr object class are:

id The ID or name of the object. The id field can be externalized as a fast path ID unless has_name_select is set to "y" (yes). The value of id is a string with a maximum length of 64 characters. IDs should be unique to your application and unique within your system.
next_id Specifies the header object for the subsequent screen; set to the value of the id field of the sm_cmd_hdr object or the sm_name_hdr object that follows this selector. The next_type field described below specifies which object class is indicated. The value of next_id is a string with a maximum length of 64 characters.
option_id Specifies the body of this selector; set to the id field of the sm_cmd_opt object. 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. Valid values are:
"" or "n" No; this is the default case. The id of this object can be used as a fast path, even if preceded by a selector screen.
"y" Yes; a selector must precede 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 selector screen. The value of name is a string with a maximum length of 1024 characters. 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. The value of name_msg_id is an integer.
type The method to be used to process the selector. The value of type is a string with a maximum length of 1 character. Valid values are:
"" or "j" Just next ID; the object following this object is always the object specified by the value of the next_id descriptor. The next_id descriptor is a fully-defined string initialized at development time.
"r" Cat raw name; in this case, the next_id descriptor is defined partially at development time and partially at runtime by user input. The value of the next_id descriptor defined at development time is concatenated with the value selected by the user to create the id value to search for next (that of the dialog or selector to display).
"c" Cat cooked name; the value selected by the user requires processing for more information. This value is passed to the command named in the cmd_to_classify descriptor, and then output from the command is concatenated with the value of the next_id descriptor to create the id descriptor to search for next (that of the dialog or selector to display).
ghost Specifies whether to display this selector screen or only the list pop-up panel produced by the command in the cmd_to_list field. The value of ghost is a string. Valid values are:
"" or "n" No; display this selector screen.
"y" Yes; display only the pop-up panel produced by the command string constructed using the cmd_to_list and cmd_to_list_postfix fields in the associated sm_cmd_opt object. If there is no cmd_to_list value, SMIT assumes this object is a super-ghost (nothing is displayed), runs the cmd_to_classify command, and proceeds.
cmd_to_classify The command string to be used, if needed, to classify the value of the name field of the sm_cmd_opt object associated with this selector. The value of cmd_to_classify is a string with a maximum length of 1024 characters. The input to the cmd_to_classify taken from the entry field is called the "raw name" and the output of the cmd_to_classify is called the "cooked name". Previous to AIX Version 4.2.1, you could create only one value with cmd_to_classify. If that value included a colon, it was escaped automatically. In AIX Version 4.2.1 and later, you can create multiple values with cmd_to_classify, but the colons are no longer escaped. The colon is now being used as a delimiter by this command. If you use colons in your values, you must preserve them manually.
cmd_to_classify_postfix The postfix to interpret and add to the command string in the cmd_to_classify field. The value of cmd_to_classify_postfix is a string with a maximum length of 1024 characters.
raw_field_name The alternate name for the raw value. The value of raw_field_name is a string with a maximum length of 1024 characters. The default value is "_rawname" .
cooked_field_name The alternate name for the cooked value. The value of cooked_field_name is a string with a maximum length of 1024 characters. The default value is "cookedname" .
next_type The type of screen that follows this selector. Valid values are:
"n" Name; a selector screen follows. See the description of next_id above for related information.
"d" Dialog; a dialog screen follows. See the description of next_id above for related information.
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.

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

Related Information

System Management Interface Tool (SMIT) for Programmers.

Understanding SMIT Object Classes.

The smit command.

sm_cmd_hdr (SMIT Dialog Header) Object Class, sm_cmd_opt (SMIT Dialog/Selector Command Option) Object Class, sm_menu_opt (SMIT Menu) Object Class.

SMIT Example Program.


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