Difference between revisions of "Extensions.HMI.IsScreenClosedEvent"

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;">
BooleanTerm = HMI.IsScreenClosedEvent(EventValue, ScreenVariable);
+
BooleanTerm HMI.IsScreenClosedEvent(EventValue event, ScreenVariable screen);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
The '''IsScreenClosedEvent''' term accepts an '''EventValue''' term yielding an '''Event''' object that has been raised by the OTX runtime, as a result of declaring a '''Screen''' object as an event source by using the term [[Extensions.HMI.ScreenClosedEventSource|'''ScreenClosedEventSource''']]. The term shall return '''TRUE''' if and only if the '''Event''' originates from a [[Extensions.HMI.ScreenClosedEventSource|'''ScreenClosedEventSource''']] term. In case an optional '''ScreenVariable''' is specified, the term shall return '''TRUE''' if and only if the '''Event''' was fired because that particular '''Screen''' was closed.
+
The '''IsScreenClosedEvent''' term accepts an '''EventValue''' term yielding an '''Event''' object that has been raised by the OTX runtime, as a result of declaring a '''Screen''' object as an event source by using the term [[Extensions.HMI.ScreenClosedEventSource|'''ScreenClosedEventSource''']]. The term will return '''TRUE''' if and only if the '''Event''' originates from a [[Extensions.HMI.ScreenClosedEventSource|'''ScreenClosedEventSource''']] term. In case an optional '''ScreenVariable''' is specified, the term will return '''TRUE''' if and only if the '''Event''' was fired because that particular '''Screen''' was closed.
  
 
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | This value is TRUE if the event of a [[Extensions.HMI.ScreenClosedEventSource|ScreenClosedEventSource]] term comes.}}
 
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | This value is TRUE if the event of a [[Extensions.HMI.ScreenClosedEventSource|ScreenClosedEventSource]] term comes.}}
Line 16: Line 16:
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| Event | [[Extensions.EventHandling.Event|Event]] | [[Value]] | - | [1] | Represents the Event whose type shall be tested.}}
+
{{TableRowPropertie1| Event | [[Extensions.EventHandling.Event|Event]] | [[Value]] | - | [1] | Represents the Event whose type will be tested.}}
 
{{TableRowPropertie2| Screen | [[Extensions.HMI.Screen|Screen]] | [[Variable]] | - | [0..1] | Optionally specifies the particular Screen which fired the event.}}
 
{{TableRowPropertie2| Screen | [[Extensions.HMI.Screen|Screen]] | [[Variable]] | - | [0..1] | Optionally specifies the particular Screen which fired the event.}}
 
|}
 
|}
Line 22: Line 22:
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 +
/// Signatures
 +
 
package HMI.ScreenSignature ScreenSignature1(ref Integer ScreenInOutParameter1);
 
package HMI.ScreenSignature ScreenSignature1(ref Integer ScreenInOutParameter1);
  

Latest revision as of 02:36, 13 September 2019

Classification

Name IsScreenClosedEvent
Short Description Checks whether the event of a ScreenClosedEventSource term comes
Class Term
Extension OTX HMI extension
Group HMI related terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

BooleanTerm HMI.IsScreenClosedEvent(EventValue event, ScreenVariable screen);

Description

The IsScreenClosedEvent term accepts an EventValue term yielding an Event object that has been raised by the OTX runtime, as a result of declaring a Screen object as an event source by using the term ScreenClosedEventSource. The term will return TRUE if and only if the Event originates from a ScreenClosedEventSource term. In case an optional ScreenVariable is specified, the term will return TRUE if and only if the Event was fired because that particular Screen was closed.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
Boolean This value is TRUE if the event of a ScreenClosedEventSource term comes.

Properties

Name Data Type Class Default Cardinality Description
Event Event Value - [1] Represents the Event whose type will be tested.
Screen Screen Variable - [0..1] Optionally specifies the particular Screen which fired the event.

OTL Examples

/// Signatures

package HMI.ScreenSignature ScreenSignature1(ref Integer ScreenInOutParameter1);

/// Global Declarations

public procedure main()
{
	/// Local Declarations

	HMI.Screen ScreenHandle1;
	Integer Integer1;
	EventHandling.EventSource EventSource1;
	Boolean Boolean1 = false;
	EventHandling.Event Event1;

	/// Flow

	HMI.OpenScreen(ScreenHandle1, ScreenSignature1, {ScreenInOutParameter1 = Integer1}, false);
	EventSource1 = HMI.ScreenClosedEventSource(ScreenHandle1);
	HMI.CloseScreen(ScreenHandle1);
	EventHandling.WaitForEvent({EventSource1}, Event1);
	Boolean1 = HMI.IsScreenClosedEvent(Event1, ScreenHandle1);
}

See also

ScreenClosedEventSource
ScreenIsOpen