Porovnávané verzie
porovnané s
Kľúč
- Tento riadok sa pridal
- Riadok je odstránený.
- Formátovanie sa zmenilo.
%GetSelfHBJ function
Function
The function retrieves the unique identifier (HOBJ) of the object within the frame of which the script is interpreted (object of Event type or active picture).
Declaration
| Blok kódu | ||||
|---|---|---|---|---|
| ||||
HBJ %GetSelfHBJ( BOOL in bBaseHBJ := @TRUE ) |
Parameters
| bBaseHBJ | Optional parameter. Possible values:
|
Description
If the function is called in the context of a Unit event, it returns an event not a Unit HBJ.
Example
For the script of the E.Test event, there is valid:
| Blok kódu | ||||
|---|---|---|---|---|
| ||||
INT _i |
| Blok kódu | ||||
|---|---|---|---|---|
| ||||
INT _i1 |
| Blok kódu | ||||
|---|---|---|---|---|
| ||||
| Blok kódu | ||||
|---|---|---|---|---|
| ||||
_i := E.Test\HBJ |
| Blok kódu | ||||
|---|---|---|---|---|
| ||||
_i1 := %GetSelfHBJ() |
| Blok kódu | ||||
|---|---|---|---|---|
| ||||
IF _i = _i1 THEN ; condition is always true |
| Blok kódu | ||||
|---|---|---|---|---|
| ||||
ENDIF |
If given object is not open as an instance, then %GetSelfHBJ(@TRUE) = %GetSelfHBJ(@FALSE).
Note
See: %HI_GetSelfInstanceId().