My favorites | Sign in
Project Home Downloads
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 18: Array return values don't get converted to JavaScript
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  leeor.ah...@gmail.com
Closed:  Dec 2011


 
Reported by mikeyk...@gmail.com, Oct 21, 2011
What steps will reproduce the problem?
1. In JavaScript, call a function on an ActiveX control that return an array

What is the expected output? What do you see instead?
I expect to get a JavaScript array as a return value.  However, no value is returned

What version of the product are you using? On what operating system?
Head revision (14e849830355) on Win7

Please provide any additional information below.

I've attached a bugfix for converting a COM array to an NPVARAINT.  Variant2NPVar switches on the COM Variant type.  Before this fix, VT_ARRAY was a case within this switch statement.  Since VT_VARIANT is a flag that is combined with the type of the elements (e.g. VT_ARRAY | VT_BSTR for an array of BSTRs), the Variant type will never equal VT_ARRAY.  The case will never be hit.  The patch changes the function to use a logical AND to determine if we are working with an array.  The code that actually does the conversion was correct, it just was not being hit.




array.txt
756 bytes   View   Download
Dec 28, 2011
Project Member #1 leeor.ah...@gmail.com
Applied the suggested patch. I do not have an ActiveX control I can easily test this with, and would appreciate validation.

Thanks.
Status: Fixed
Owner: leeor.ah...@gmail.com

Powered by Google Project Hosting