get

[ Function ]

public static get(): TcHmi.Controls.System.baseTcHmiControl | null;

Returns the current view object.

Parameter

Name

Type

Description

-

-

-

Return value

Type

Description

TcHmi.Controls.System.baseTcHmiControl, null

The current view control object or null in the event of an error.

get 1:

Available from 1.8

Sample - JavaScript

var v1 = TcHmi.View.get();
if (v1) {
    TcHmi.Log.debug('Name of current view: ' + v1.getId());
}
TcHmi.View.load('View2.view', function (data) {
    var v2 = TcHmi.View.get();
    if (v2) {
        TcHmi.Log.debug('Name of current view: ' + v2.getId());
    }
});