1 Reply Latest reply on Jan 28, 2009 9:36 AM by Newsgroup_User

    Error calling flex from C# with ArrayCollection

    WayneChristian
      I'm having a problem calling functions from C# to Flex ActionScript.
      I can successfully call functions with "simple" parameters (int, String, Boolean), and with structures/object/classes
      and I can use externalinterface to call from flex to C# passing ArrayCollection, but I'm having problems calling from C# to flex passing an ArrayCollection. I'm using the ExternalInterface classes at the adobe site
      http://livedocs.adobe.com/flex/3/htm...erface_10.html
      ===
      On the Flex side, I'm getting the following exception.

      TypeError: Error #1034: Type Coercion failed: cannot convert []@94f85f1 to mx.collections.ArrayCollection

      The request passed to _flashControl.CallFunction is as follows

      ============
      <invoke name="setTreeCollection" returntype="xml"><arguments><array><property id="0"><object><property id="id"><number>0</number></property><property id="name"><string>All CUSTOMER_AGE
      $6,175,043.81</string></property><property id="tooltip"><string>All CUSTOMER_AGE
      Sum of NEW_BUSINESS_VALUE $6,175,043.81</string></property><property id="cardinality"><number>6</number></property><property id="levelNumber"><number>0</number></property><property id="childLevelLabel"><string /></property><property id="dimensionSeparator"><string /></property><property id="linkLabel"><string>100.00%</string></property><property id="isExpanded"><false /></property><property id="parentId"><number>2147483647</number></property></object></property></array></argumen ts></invoke>
      __________________