Difference between revisions of "Extensions.HMI.IsScreenClosedEvent"

From emotive
Jump to navigation Jump to search
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:  '''IsScreenClosedEvent'''}}[[Category:HMI]]
 
{{DISPLAYTITLE:  '''IsScreenClosedEvent'''}}[[Category:HMI]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | IsScreenClosedEvent | Checks whether the event of a '''ScreenClosedEventSource''' term comes | [[Term]] | [[Extensions.HMI|OTX HMI extension]] | [[HMI related terms]] | - | - }}
+
{{ClassificationActivity | IsScreenClosedEvent | Checks whether the event of a '''ScreenClosedEventSource''' term comes | [[Term]] | [[Extensions.HMI|OTX HMI extension]] | [[Extensions.HMI#Terms|HMI related terms]] | - | - }}
  
 
== 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(EventTerm, ScreenHandle);
+
BooleanTerm HMI.IsScreenClosedEvent(EventValue event, ScreenVariable screen);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
The term returns TRUE if exactly then the event of a '''ScreenClosedEventSource''' term comes. In the case of an optional ''screen'' variable is specified, the term will return TRUE if exactly then the event was triggered, because this 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] | The event, whose type is checked}}
+
{{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] | Optional are the special screen that triggers the event}}
+
{{TableRowPropertie2| Screen | [[Extensions.HMI.Screen|Screen]] | [[Variable]] | - | [0..1] | Optionally specifies the particular Screen which fired the event.}}
 
|}
 
|}
  
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
package Hmi.ScreenSignature ScreenSignature1(ref Integer ScreenInOutParameter1);
+
/// Signatures
 +
 
 +
package HMI.ScreenSignature ScreenSignature1(ref Integer ScreenInOutParameter1);
 +
 
 +
/// Global Declarations
  
 
public procedure main()
 
public procedure main()
 
{
 
{
  Hmi.Screen ScreenHandle1;
+
/// Local Declarations
  Integer ScreenInOut1;
+
 
  EventHandling.EventSource EventSource1;
+
HMI.Screen ScreenHandle1;
  EventHandling.Event Event1;
+
Integer Integer1;
  Boolean Boolean1 = false;
+
EventHandling.EventSource EventSource1;
 +
Boolean Boolean1 = false;
 +
EventHandling.Event Event1;
 +
 
 +
/// Flow
  
  Hmi.OpenScreen(ScreenSignature1, false, {ref ScreenInOutParameter1 = ScreenInOut1}, ScreenHandle1);
+
HMI.OpenScreen(ScreenHandle1, ScreenSignature1, {ScreenInOutParameter1 = Integer1}, false);
  EventSource1 = Hmi.ScreenClosedEventSource(ScreenHandle1);
+
EventSource1 = HMI.ScreenClosedEventSource(ScreenHandle1);
  Hmi.CloseScreen(ScreenHandle1);
+
HMI.CloseScreen(ScreenHandle1);
  EventHandling.WaitForEvent({EventSource1}, Event1);
+
EventHandling.WaitForEvent({EventSource1}, Event1);
  Boolean1 = Hmi.IsScreenClosedEvent(Event1, ScreenHandle1);
+
Boolean1 = HMI.IsScreenClosedEvent(Event1, ScreenHandle1);
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>

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