Ole4D Methods

OCSetTextOfSender(p_EventId;p_Propery;p_Value)


Used to set a property of the Ole object from within the 4D event handling method.
The property must be of type String.
"p_EventId" is the event id, "p_Property" is the name of the OleObject property that you want to set, and "p_Value" is the value that you want to assign to the property .
The event id is sent as a parameter to the 4D method that handles the event.

Parameters

Parameter Type   Description
p_EventId String ->

Event identifier.
This value is given as a first parameter to the 4D event handling method.

p_Property String -> Name of the property to which you want to assign a value.
p_Value String -> String type value that you want to assign to the property.



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
$i:=OCSetTextOfSender($1;"TextProperty";"Hello")

is equivalent to the following sequence of code:

$i:=OCRunScript ("ExampleHost";"Set OleObj=SHost.Sender("+$1"+")")
$i:=OCRunScript ("ExampleHost";"OleObj.TextProperty = "+char(34)+"Hello"+char(34))


The "ExampleHost" script host must be already created.