OnExternalEvent action


Function
This action defines the handler procedure of the event generated by an external library.
Declaration
 ON  externalEvent GOTO procName [PRTY prtyIdent] 
Parameters
externalEventinTextual constant which specifies a name of the event generated by an external library.
procNameinName of RPC or RPCX procedure in ESL script. The procedure must consists of one parameter of structured variable type. The values of this structured variable depend on the particular external event which is handled.
prtyIdentinOptional parameter of Int type. A priority when calling RPC.
Description
The action specifies a procedure (by procName), which will be called back if an event with the given name is generated in an external library. The called procedure must be defined in ESL script which is executed in the same process as the script which works with the external functions of the library. When defining the handler of the same external event in the several ESL scripts, the information about event will be sent to all scripts.
The keyword PRTY enables to enter the priority of executing the registered RPC procedure. This feature ensures preferred executing of registered RPC procedure.
The list of generated events and their description is included in the documentation for extended libraries of the D2000 System.
Example
 ; the function that will process an information about event
 RPC PROCEDURE OnExternalEvent (IN RECORD NOALIAS (SD.ExternalEventParams) _params
 END OnExternalEvent 
 
 BEGIN
 ; registering the event handler with the name "ExternalEvent"
 ON "ExternalEvent" GOTO OnExternalEvent
 END 

Related pages:

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .