get
[ Function ]
public static get(): TcHmi.Controls.System.baseTcHmiControl | null;
Returns the current view object.
Parameter
Name | Type | Description |
---|---|---|
- | - | - |
Return value
Type | Description |
---|---|
The current view control object or null in the event of an error. |
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());
}
});