Difference between revisions of "Extensions.HMI.InputDialog"

From emotive
Jump to navigation Jump to search
 
(2 intermediate revisions by one other user not shown)
Line 5: Line 5:
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
HMI.InputDialog(StringTerm, StringTerm, StringTerm, StringTerm, StringTerm, StringVariable);
+
HMI.InputDialog(StringTerm message, StringTerm title, StringTerm initialValue, StringTerm instruction, StringTerm restriction, StringVariable result);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
The '''InputDialog''' activity opens a dialog requesting string input from the user. If needed, an initial value can be passed to the dialog which shall be shown initially in the input field. Also an input restriction can be passed to the dialog; this shall be used by runtime systems to pre-validate inputs before they are passed back to the test sequence. Finally the entered value is assigned to a string variable for later use in the test sequence.
+
The '''InputDialog''' activity opens a dialog requesting string input from the user. If needed, an initial value can be passed to the dialog which will be shown initially in the input field. Also an input restriction can be passed to the dialog; this will be used by runtime systems to pre-validate inputs before they are passed back to the test sequence. Finally the entered value is assigned to a string variable for later use in the test sequence.
  
 
{{Note|'''InputDialog''' can only handle simple strings. There are no facilities provided for number parsing etc. It is assumed that the OTX sequence will perform these actions upon receiving the value.}}
 
{{Note|'''InputDialog''' can only handle simple strings. There are no facilities provided for number parsing etc. It is assumed that the OTX sequence will perform these actions upon receiving the value.}}
Line 16: Line 16:
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| InitialValue | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [0..1] | The string value that shall be used to initialize the dialog's input field.}}
+
{{TableRowPropertie1| InitialValue | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [0..1] | The string value that will be used to initialize the dialog's input field.}}
{{TableRowPropertie2| Instruction | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [0..1] | An additional message that can be shown on the input dialog to provide information regarding the expected value that should be introduced.}}
+
{{TableRowPropertie2| Instruction | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [0..1] | An additional message that can be shown on the input dialog to provide information regarding the expected value that will be introduced.}}
{{TableRowPropertie1| Restriction | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [0..1] |  A restriction onto the set of allowed input values. The restriction shall be formulated by a regular expression which shall be used by runtime systems to pre-validate the input data.}}
+
{{TableRowPropertie1| Restriction | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [0..1] |  A restriction onto the set of allowed input values. The restriction will be formulated by a regular expression which will be used by runtime systems to pre-validate the input data.}}
{{TableRowPropertie2| Result | [[Core.DataTypes.SimpleDataType.String|String]] | [[Variable]] | - | [1] | After the user dismisses the input dialog, the entered value shall be assigned to the string variable given by this element.}}
+
{{TableRowPropertie2| Result | [[Core.DataTypes.SimpleDataType.String|String]] | [[Variable]] | - | [1] | After the user dismisses the input dialog, the entered value will be assigned to the string variable given by this element.}}
 
|}
 
|}
  
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 +
/// Local Declarations
 +
 
String String1;
 
String String1;
  

Latest revision as of 02:32, 13 September 2019

Classification

Name InputDialog
Short Description Dialog, the user's input requesting
Class Action
Extension OTX HMI extension
Group Dialog related actions
Exceptions OutOfBoundsException
Checker Rules -
Standard Compliant Yes

OTL Syntax

HMI.InputDialog(StringTerm message, StringTerm title, StringTerm initialValue, StringTerm instruction, StringTerm restriction, StringVariable result);

Description

The InputDialog activity opens a dialog requesting string input from the user. If needed, an initial value can be passed to the dialog which will be shown initially in the input field. Also an input restriction can be passed to the dialog; this will be used by runtime systems to pre-validate inputs before they are passed back to the test sequence. Finally the entered value is assigned to a string variable for later use in the test sequence.

Icons Note.png InputDialog can only handle simple strings. There are no facilities provided for number parsing etc. It is assumed that the OTX sequence will perform these actions upon receiving the value.

Properties

Name Data Type Class Default Cardinality Description
InitialValue String Term - [0..1] The string value that will be used to initialize the dialog's input field.
Instruction String Term - [0..1] An additional message that can be shown on the input dialog to provide information regarding the expected value that will be introduced.
Restriction String Term - [0..1] A restriction onto the set of allowed input values. The restriction will be formulated by a regular expression which will be used by runtime systems to pre-validate the input data.
Result String Variable - [1] After the user dismisses the input dialog, the entered value will be assigned to the string variable given by this element.

OTL Examples

/// Local Declarations

String String1;

/// Flow
		
HMI.InputDialog("Message", "Title", "Init", "Instruction", "Restriction", String1);

See also

ConfirmDialog
ChoiceDialog
ShowDocumentDialog