When I gave my first flexool build to Zoltan, he reported 2 erros and one of them was “TypeError: Error #1034: Type Coercion failed: cannot convert mx.utils::ObjectProxy@6380a19 to mx.collections.ArrayCollection”.
Not a familiar one for me. So I checked the engine I sent him on my machine. It was working fine without error. the i googled and found the reason behind this. It happens when there is only 1 single node in the xml flex is trying to load. So it is returned as an ObjectProxy instead of an Array and the error pops up. Perhaps a bug with flex.
See the solution here: http://forum.sephiroth.it/showthread.php?p=32751
It solved my problem. thanks tekati




3 responses so far ↓
Marla // March 13, 2009 at 3:18 am
Thank you! This solved my issue. I was stuck on this all day, it never occurred to me an array with one parent node wouldn’t be treated as an array.
Kuls // April 2, 2009 at 2:13 am
Bravo Mohit & Tetaki ..Bravo !!! [:)]
Jose D. Montero // December 12, 2009 at 4:52 am
Flex Error #1034
By Jose D. Montero
Date Dec. 11, 2009
TypeError: Error #1034: Type Coercion failed: cannot convert mx.utils::ObjectProxy@6380a19 to mx.collections.ArrayCollection”.
It is correct the answer. .
Example:
I got the errors when I had:
Where variable gasBalancesList was defined as ArrayCollection and the gasBalancesData.xml file was the following:
1001
Ga for NW Pipe Line Location1
789001
active
50521
12/11/2009
Solution: Add at least one more record. If there is only one then it treats result as an ObjectProxy. If two or more records then it forces result to be Array Collection.