by joe_blaze » May 30th, 2016, 2:09 pm
Hi Ajay,
Thanks for the report of these issues.
The preservation of the shape of character scalars in the round trip via the CSE 'SetValue' and 'GetValue' can be resolved and will be included in the next version of the CSE.
The non-preservation of the shape of character arrays of rank 2 or greater is a limitation of the Win32 ActiveX interface and is not inherent in the []cse.
This limitation applies to the []wi ActiveX client interface to COM servers as well as the []cse ActiveX client interface to the SignalR server.
Resolving this for []wi and APL+Win as the COM server can be done using the 'apldata' property, because both sides of the interface are APL+Win.
There is no resolution for []wi when the COM server is not APL+Win.
Resolving this for []cse is non-trivial. There is no possibility of changing C#, so using the Win32 ActiveX interface directly as is done now is not a possibility.
It is an interesting issue of which we are aware and will consider some options in a future version of the CSE.
See below for a []wi example which illustrates how the 'apldata' property can be used with []wi and APL+Win on both sides of an ActiveX interface:
⎕wself←'apl'⎕wi 'Create' 'APLW.WSEngine'
⎕wi 'xVisible' 1
⎕wi 'xVariable' 'mat1' (mat1←2 3⍴'abcdef')
mat1Returned←⎕wi 'xVariable' 'mat1'
⍴⎕←mat1⋄⍴⎕←mat1Returned
abc
def
2 3
abc def
2
⎕wi 'xVariable' 'mat2' (mat2←2 3 4⍴'abc')
mat2Returned←⎕wi 'xVariable' 'mat2'
⍴⎕←mat2⋄⍴⎕←mat2Returned
abca
bcab
cabc
abca
bcab
cabc
2 3 4
abca bcab cabc
abca bcab cabc
2 3
⎕wi 'apldata' 1
⎕wi 'xVariable' 'mat1' (mat1←2 3⍴'abcdef')
mat1Returned←⎕wi 'xVariable' 'mat1'
⍴⎕←mat1⋄⍴⎕←mat1Returned
abc
def
2 3
abc
def
2 3
⎕wi 'xVariable' 'mat2' (mat2←2 3 4⍴'abc')
mat2Returned←⎕wi 'xVariable' 'mat2'
⍴⎕←mat2⋄⍴⎕←mat2Returned
abca
bcab
cabc
abca
bcab
cabc
2 3 4
abca
bcab
cabc
abca
bcab
cabc
2 3 4