content.gifmenu.gifbasics.gif

Compatible functions

Several existing control functions were adapted in JavaScript for compatibility with the Ultralight Client to optimally use existing panels with the Ultralight Client.

Below is the complete list of compatible functions as well as their restrictions.

Ultralight compatible control functions

note.gifnote

The field “area” indicates where the function is executed:

Function

Return type

Control function

Area

Notes & Restrictions

Debug( string message )

void

Debug()

s

Only one string parameter possible.

"__LINE__" or "__FILE__" are not evaluated.

DebugN( string message )

void

DebugN()

s

Only one string parameter possible.

"__LINE__" or "__FILE__" are not evaluated.

dpConnect( [bool noLoss,] string cbFunc, [bool wantsAnswer], string dp1[, dp2 …]) oder dpConnect( [bool noLoss,] string cbFunc, [bool wantsAnswer], dyn_string dpList )

int

dpConnect()

a 

The additional parameter “noLoss” defines whether all data is requested to be returned or just those values which changed at last. Default value: false; Maximum 8 DP-parameters.

dpConnectUserData( [bool noLoss,] string cbFunc, anytype userData, [bool wantsAnswer], string dp1[, dp2 …]) oder dpConnectUserData( [bool noLoss,] string cbFunc, anytype userData, [bool wantsAnswer], dyn_string dpList)

int

dpConnectUserData()

a

The additional parameter “noLoss” defines whether all data is requested to be returned or just those values which changed at last. Default value: false

dpDisconnect( string cbFunc, string dp1[, dp2 ..] )

int

dpDisconnect()

a

 

dpExists(string dpName )

bool

dpExists()

s

 

dpGet(string dpe, anytype value )

anytype

dpGet()

s

Parameter restriction: Only one data point / value pair possible; Returns “-1” (string) in case of an error; the result is returned into the return value. (Restriction of JavaScript)

If the return value is of type dyn_string, following element must not be used: " | ".

dpGetAlias( string dpe )

string

dpGetAlias()

s

 

dpGetComment( string dpe )

string

dpGetAllComments()

s

 

dpGetDescription( string dpe )

string

dpGetAllDescriptions()

s

 

dpGetUnit( string dpe )

string

dpGetUnit()

s

 

dpNames( [ string dpPattern[, string dpType ]] )

dyn_string

dpNames()

s

 

dpSet( string dpe, anytype value[, string dpe2, anytype val2 …] )

int

dpSet()

s

No dyn-parameters possible.

dpSubStr( string dp, int pattern )

string

dpSubStr()

s

 

dpTypeName( string dpName )

string

dpTypeName()

s

 

dpValToString( dpe, value, unit )

string

dpValToString()

s

 

dynAppend( dyn_type x, type | dyn_type y )

int

dynAppend()

l

 

dynClear( dyn_type x )

int

dynClear()

l

 

dynContains( dyn_type x, type y )

int

dynContains()

l

 

dynCount( dyn_type x, type y )

int

dynCount()

l

 

dynlen( dyn_type x )

int

dynlen()

l

 

dynRemove( dyn_type x, int pos )

int

dynRemove()

l

 

getCatStr( catalog, msgKey[, int langIx] )

string

getCatStr()

s

This function is already replaced by its result during the panel conversion.

If the third parameter is not set, the Ultralight Client will use the language of the web browser (if available).

getCurrentTime()

Date

getCurrentTime()

l

Returns only the server time.

getLastError()

int 

getLastError()

l

 

getLocale

string

getLocale()

s

 

getSystemName()

string

getSystemName()

 

 

getUserName( int userId )

string

getUserName()

s

 

getUserPermission(int level int, userId )

bool

getUserPermission()

s

When used with the Ultralight Client the function saves the permissions of the current user inside a cache to reduce the number of server requests and increase the performance of the UI. When the user is changed, the permissions for the new user will be requested and the cache will be renewed.

getValue()

anytype

getValue()

l

The converter replaces this function with the function sdGetValue. The function “getValue” is not implemented on the client side.

invokeMethod(string shape, string attribute, anytype value[, anytype value2 …] )

int 

invokeMethod()

l

The point notation is replaced for EWOs. Please also refer to restrictions – point notation.

isUltralight()

bool 

isUltralight()

l

Returns the value „true“ in the web browser and returns the value “false” in the control application.

makeDynAnytype( … )

dyn_anytype

makeDynAnytype()

l

 

makeDynBool( … )

dyn_bool

makeDynBool()

l

 

makeDynChar( … )

dyn_char

makeDynChar()

l

 

makeDynFloat( … )

dyn_float

makeDynFloat()

l

 

makeDynInt( … )

dyn_int

makeDynInt()

l

 

makeDynLong( … )

dyn_long

makeDynLong()

l

 

makeDynMixed( … )

dyn_mixed

makeDynMixed()

l

 

makeDynString( … )

dyn_string

makeDynString()

l

 

makeDynTime( … )

dyn_time

makeDynTime()

l

 

makeDynUInt( … )

dyn_uint

makeDynUInt()

l

 

makeDynULong( … )

dyn_ulong

makeDynULong()

l

 

makeDynMapping( … )

dyn_mapping

makeDynMapping()

l

4 entries (objects) are initialized by default.

makeError( [bit32 bit[, int prio[, int type[, int code[, string dp [, int man[, int user[, string note1[, string note2[, string note3]]]]]]]]]] )

string

makeError()

l

 

makeTime( year, month, day, hour, minute, second, milli, daylightsaving )

Date

makeTime()

l

 

myModuleName( string  shape )

string

myModuleName()

l

Can only be used in an embedded module.

patternMatch()

bool

patternMatch()

l

 

PanelOff()

void

panelOff()

l

 

period( Date dt )

int

period()

l

 

setLastError(int  errCode )

int 

 

l

 

setPeriod( Date dt, int seconds[, int milli] )

Date

setPeriod()

l

 

setValue( string shape, string attribute,anytype  value[, anytype value2] )

int 

setValue()

l

 

shapeExists(string shapeName)

bool

shapeExists()

l

 

std_help()

 

std_help()

 

 

strlen( string str )

int

strlen()

l

 

strpos( string str, string search[, int startPos ] )

int

strpos()

l

 

strsplit( string line, string/char delim )

dyn_string

strsplit()

I

 

substr( string str, int pos, int len )

string

substr()

l

 

throwError( string msg )

void 

throwError()

s

 

toolTipText

 

"toolTipText"

 

tooltip texts in html aren't supported. Font and size depends on the utilized browser, as well as the display duration and the switch-on time. IE8 with Adobe SVG viewer isn't supported anymore.

trim( string str )

string

 

l

 

Top Of Page

V 3.11 SP1

Copyright ETM professional control 2012 All Rights Reserved