ask.enum()

Syntax
domain ask.enum( string quescode(10), domain default_enumval [, arg ] ... )


Description
This displays a message box containing a question and a number of possible responses. The responses are presented as push buttons. To respond to the question and close the message box, the user selects one of the push buttons. 
The possible responses are defined in the data dictionary as an enumerated domain. By default, the function displays all of the defined enumerate values. To display a subset only, call set.enum.values() before calling ask.enum().

Arguments
quescode:The question to be displayed in the message box is defined in the data dictionary. This argument specifies the data dictionary code for the question. If the question contains substitution symbols, use the third and subsequent arguments to specify the values to substitute for these symbols.
default_enumval :Specifies the enumerate value of the default answer. For example, yesno.yes. If this argument is empty, the default value specified in the data dictionary is used.
arg, … :The values to substitute for any substitution symbols that the question contains. See sprintf().


Notes
The question text and the push button labels are always in the language of the user. The return value of ask.enum() is always the name of the enumerate value and not its description. So the script in which the function is used remains language independent.
After execution of ask.enum(), the standard variable attr.enum.mask$ is cleared. This also happens when the standard program calls ask.enum().


Return values
The value of the enumerated domain that corresponds to the option selected by the user. This is always the name of the enumerate value and not its description.

Related Post:

People who read this post also read :



0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More