Hi All,
The customer wants to receive a parameter of the array type from ActiveX.
How to code it?
Does anyone have experience to do that?
Best regards, Yukiko Ikeo
How to receive a parameter of the array type from ActiveX?
-
Yukiko Ikeo
- Posts: 26
- Joined: Fri Jun 09, 2017 11:58 pm
-
HamadSheikh
- Posts: 27
- Joined: Fri Mar 18, 2016 3:49 am
- Location: USA
- Contact:
Re: How to receive a parameter of the array type from ActiveX?
Just so this doesn't get lost in translation, can you elaborate on what the array looks like in this case i.e. how many elements, what is the data type etc.
-
Yukiko Ikeo
- Posts: 26
- Joined: Fri Jun 09, 2017 11:58 pm
Re: How to receive a parameter of the array type from ActiveX?
Hi Hamad,
Thank you for your reply.
The array looks like as below.
“351,1101”
“352,1102”
- elements are 2
- the data type is String
The customer coded as below.
However #WkConnections displays blank value.
**************
Evtroutine Handling(#AVAYA.OnTransferred) TransferredConnections(#Connections)
*
DEFINE_COM CLASS(#PRIM_VAR) NAME(#WkConnections)
SET COM(#WkConnections) VALUE(#Connections)
*
Use Message_box_clear
Use Message_box_add (#WkConnections)
Use Message_box_show
*
Endroutine
**************
Regards, Yukiko Ikeo
Thank you for your reply.
The array looks like as below.
“351,1101”
“352,1102”
- elements are 2
- the data type is String
The customer coded as below.
However #WkConnections displays blank value.
**************
Evtroutine Handling(#AVAYA.OnTransferred) TransferredConnections(#Connections)
*
DEFINE_COM CLASS(#PRIM_VAR) NAME(#WkConnections)
SET COM(#WkConnections) VALUE(#Connections)
*
Use Message_box_clear
Use Message_box_add (#WkConnections)
Use Message_box_show
*
Endroutine
**************
Regards, Yukiko Ikeo
- Attachments
-
- image.png (75.87 KiB) Viewed 9373 times
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: How to receive a parameter of the array type from ActiveX?
Hi Yukiko,
What I'd suggest is that you have a look at how LANSA created the event definition. (Right click the Event Name and select Features.)
The "TransferredConnections" parameter will be of a particular type (#MYACTIVEX.SomeType) and this type must be some sort of Collection.
I'm pretty confident that you iterate over that collection using the For Each() construct.
Alternatively you can use properties like ItemCount and Item<1> etc to access the individual items.
Goodluck,
Danny
PS: your code snippet just casts the collection to a VARIANT, fooling the compiler in letting you use it as a string in the Message Box logic. But it won't magically turn the object into a string at runtime, that's why your message box is empty.
What I'd suggest is that you have a look at how LANSA created the event definition. (Right click the Event Name and select Features.)
The "TransferredConnections" parameter will be of a particular type (#MYACTIVEX.SomeType) and this type must be some sort of Collection.
I'm pretty confident that you iterate over that collection using the For Each() construct.
Alternatively you can use properties like ItemCount and Item<1> etc to access the individual items.
Goodluck,
Danny
PS: your code snippet just casts the collection to a VARIANT, fooling the compiler in letting you use it as a string in the Message Box logic. But it won't magically turn the object into a string at runtime, that's why your message box is empty.