|
OCGetTextParam(p_EventId;p_ParamN;p_4DVar)
Used to retrieve the value of an event parameter from within the 4D event handling method.
The parameter must be of type String.
"p_EventId" is the event id, "p_ParamN" is the number of parameter, and "p_4DVar" is the 4D variable that will receive the value of the parameter.
The numbering of
the parameters starts from 0.
The event id is sent as a parameter to the 4D method that handles the event.
The "p_4DVar" variable must be a process or interprocess of type Text, and already declared.
Parameters
| Parameter |
Type |
|
Description |
| p_EventId |
String |
-> |
Event identifier.
This value is given as a first parameter to the 4D event handling method.
|
| p_ParamN |
Integer |
-> |
Number of the parameter which value you want to retrieve, starting from 0. |
| p_4DVar |
Text |
<- |
4D process or interprocess variable of type Text which has to be declared before executing this command. |
Return Values
0 – The method call was successful.
If the method call was not successful the
return value is not zero. For more information call OCLastError.
Example
C_Text(TextVar)
$i:=OCGetTextParam($1;0;TextVar)
is equivalent to the following sequence of code:
C_Text(TextVar)
$i:=OCRunScript ("ExampleHost";"txtVariable = SHost.GetParam ("+$1+", 0)")
$i:=OCRunScript ("ExampleHost";"SHost.SetText "+Char(34)+"TextVar"+Char(34)+", txtVariable")
,which assigns to the "TextVar" 4D variable the value of the first parameter.
The "ExampleHost" script host must be already created.
|