Difference between revisions of "Extensions.HMI.ConfirmationType"

From emotive
Jump to navigation Jump to search
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:Data Type '''ConfirmationType'''}}[[Category:DataType]][[Category:HMI]]
 
{{DISPLAYTITLE:Data Type '''ConfirmationType'''}}[[Category:DataType]][[Category:HMI]]
 
== Classification ==
 
== Classification ==
{{ClassificationDataType | ConfirmationType | The button-choice of a user dismissing a '''ConfirmDialog''' | [[Simple Data Type]] | - | DefaultValue=YES | Literal=Yes }}
+
{{ClassificationDataType | ConfirmationType | The button-choice of a user dismissing a '''ConfirmDialog''' | [[Core.DataTypes.SimpleDataType|Simple Data Type]] | [[Core.DataTypes.SimpleDataType.SimpleType|SimpleType]]| DefaultValue=YES | Literal=Yes }}
  
 
== Description ==
 
== Description ==
'''ConfirmationType''' is an enumeration type describing the button-choice of a user dismissing a [[ConfirmDialog]]. The information may later be used to find out which button was clicked for confirmation of the dialog.
+
'''ConfirmationType''' is an enumeration type describing the button-choice of a user dismissing a [[Extensions.HMI.ConfirmDialog|ConfirmDialog]]. The information may later be used to find out which button was clicked for confirmation of the dialog.
  
 
The list of allowed enumeration values is defined as follows:
 
The list of allowed enumeration values is defined as follows:
Line 27: Line 27:
  
 
==Literal==
 
==Literal==
The syntax for [[Literals| Literals for complex data types]] should be used, where the '''member value''' is one of the values in the list.
+
The syntax for [[Literals| Literals for complex data types]] will be used, where the '''member value''' is one of the values in the list.
  
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
ConfirmationType = {YES|NO|CANCEL}
+
@ConfirmationType:YES|NO|CANCEL
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 40: Line 40:
 
==Sample==
 
==Sample==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
ConfirmationType MyConfirmationTypeVariable = @ConfirmationType:YES;
+
HMI.ConfirmationType ConfirmationTypeVariable = @ConfirmationType:YES;
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 02:40, 13 September 2019

Classification

Name ConfirmationType
Short Description The button-choice of a user dismissing a ConfirmDialog
Class Simple Data Type
Base Data Type SimpleType
Default Value YES
Provide a Literal Yes
SpecifiedBy ISO 13209-3
Standard Compliant Yes

Description

ConfirmationType is an enumeration type describing the button-choice of a user dismissing a ConfirmDialog. The information may later be used to find out which button was clicked for confirmation of the dialog.

The list of allowed enumeration values is defined as follows:

Value Literal Description
YES @ConfirmationType:YES Confirmation by "Yes" button or "OK" button.
NO @ConfirmationType:NO Confirmation by "No" button.
CANCEL @ConfirmationType:CANCEL Confirmation by "Cancel" button.

Order Relation

ConfirmationType values may occur as operands of comparisons. For this case, the following order relation is defined. Started with the lowest value YES = 0:

YES < NO < CANCEL

Literal

The syntax for Literals for complex data types will be used, where the member value is one of the values in the list.

@ConfirmationType:YES|NO|CANCEL

Core Conversion

The following table shows the rules for conversion to another data type:

Conversion Result Sample
ToBoolean Undefined (should not be used)
ToInteger Returns the index of the value in the ConfirmationType enumeration (smallest index is 0) Integer val = ToInteger(@ConfirmationType:YES); // Returns 0
ToFloat Undefined (should not be used)
ToString Returns the name of the enumeration value String s = ToString(@ConfirmationType:YES); // Returns "YES"
ToByteField Undefined (should not be used)

Sample

HMI.ConfirmationType ConfirmationTypeVariable = @ConfirmationType:YES;