Extensions.HMI.IsScreenClosedEvent

From emotive
Jump to navigation Jump to search

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