%HI_SetConnectedObj function


Function

The function %HI_SetConnectedObj allows to set the connected object for the displayer of Graph, Picture/Componet or Browser type.

Declaration
BOOL %HI_SetConnectedObj(
   INT in refId, 
   HBJ in refToObj, 
   INT in instanceNr
 ) 
Parameters
refIdReference to the displayer (reference variable).
refToObjReference to the object of Graph, Report, Picture or Browser type.

Note: If the parameter is non-associated alias, ESL script generates an error Range Error (exceeding of the limits).

instanceNrNumber of instance.

Note: If the number of instance is negative, the process D2000 HI generate an error Range Error (exceeding of the limits).
Description
The function changes the connected object for displayers of Graph, Report, Picture or Browser type. The displayer is characterized by the parameter refId. The parameter refToObj determines the object to be connected. The parameter instanceNr is the instance number, with which the object will be opened.

For Browser displayer, there can be connected only Structured variable (SV.*) or Database table (DB.*). When changing the connected object, the modification of data in Browser displayer is ignored. It may be found by the function %HI_GetBrowserModifyFlag.

Return value of the function is the function success. The function can be used either as Control or as normal. The function execution will be terminated after execution of the initialisation part of the opened subpicture.

Example
%HI_SetConnectedObj(_Trend, T.Temperatures\HBJ, 0)
 
or
 
BOOL  _bOk
 _bOk := %HI_SetConnectedObj(_Trend, S.Picture\HBJ, 1) 
 IF  _bOK THEN 
 
  ; picture is opened 
 
 ELSE 
 
  ; failure in opening the picture 
 
ENDIF 
 
where:
_Trend - is RefId of the displayer of Trend type.
T.Temperatures - object of Graph type. The expression T.Temperatures\HBJ is HBJ type (reference to object)
The instance number is 0.
S.Picture - object of Picture type.
Napíšte komentár