Porovnávané verzie
porovnané s
Kľúč
- Tento riadok sa pridal
- Riadok je odstránený.
- Formátovanie sa zmenilo.
OPENEVENT action
Function
The action opens and runs given Server Event or Client and Server Event.
Declaration
Blok kódu | ||||
---|---|---|---|---|
| ||||
OPENEVENT refToServerEvent DIRECT [INSTANCE instanceExprInt] [SYNC] |
or
Blok kódu | ||||
---|---|---|---|---|
| ||||
OPENEVENT refToServerEvent ON procIdent [INSTANCE instanceExprInt] [SYNC] |
Parameters
refToServerEvent | in | Reference to server event or Client and Server Event. |
instanceExprInt | in | Expression of Int type - instance number. |
procIdent | in | Identifier of object of Process type (D2000 HI or D2000 EventHandler). |
Description
The action opens and runs the Server Event or Client and Server Event (refToServerEvent) within the D2000 HI or D2000 Event Handler processes given by the parameter procIDent.
Client and Server Event can be opened and running only within the D2000 HI, given by the parameter procIDent.
The action also allows to specify an instance number (the instanceExprInt parameter) for multiple opening of the server event within the process.
If the keyword SYNC is used, the action will be terminated after the event has been really open. After the action is terminated, RPC procedures may be called to the event.
Client and Server Event can be opened and running only within the D2000 HI, given by the parameter procIDent.
The action also allows to specify an instance number (the instanceExprInt parameter) for multiple opening of the server event within the process.
If the keyword SYNC is used, the action will be terminated after the event has been really open. After the action is terminated, RPC procedures may be called to the event.
Blok kódu | ||||
---|---|---|---|---|
| ||||
INT _hbj ; a unique identifier process TEXT _hbjdesc ; OPENEVENT E.Lib1 ON (_hbj) SYNC ; calling CALL [E.Lib1] GetDesc(_desc) ON (_hbj) |
The action ends with error, if there is the key word SYNC and:
Action with the DIRECT clause opens given event within the same process that contains the script with the OPENEVENT action.
Closing an server event opened by OPENEVENT must be required by given script - calling the CLOSE DIRECT action. It can me implemented by the following RPC procedure:
- E.Lib1 event is neither Server Event nor Client and Server Event,
- E.Lib1 event is Server Event but the process, specified by the prameter _hbj, is not D2000 HI or D2000 Event Handler or the given process is not running,
- E.Lib1 event is Client and Server Event and the process, specified by the parameter _hbj, is not D2000 HI, or the given process is not running.
Action with the DIRECT clause opens given event within the same process that contains the script with the OPENEVENT action.
Closing an server event opened by OPENEVENT must be required by given script - calling the CLOSE DIRECT action. It can me implemented by the following RPC procedure:
Blok kódu | ||||
---|---|---|---|---|
| ||||
RPC PROCEDURE Close (TEXT _desc) CLOSE DIRECT END |
WARNING: The RPC procedure Close must be called asynchronously, i.e.:
Blok kódu | ||||
---|---|---|---|---|
| ||||
CALL E.Lib1 Close (_desc) ASYNC ON (_hbj) |
Note
The change in the event configuration while running the script does not influence the run.