What are you passing in as the dataProvider for the DataGrid? It seems like
continentArray is of type String.
No, continentArray is not a String. continentArray is a List of Continent objects. The DataGrid can understand it and display it correctly. The DropDownList cannot. For whatever reason.
Why are you passing value field. I do not see any property as valuefield in dropdownlist control
I think that is the problem...
If this post answers your question or helps, please kindly mark it as such.
Try using -keep-generated-actionscript and see if you can see any problem in
the code that is generated.
OK, I removed the valueField, but there was no change in behavior. The error is still there:
-1067: Implicit coercion of a value of type String to an unrelated type mx.collections:IList.
As another test, I commented out the DropDownList (so the application would compile cleanly) and created a TextInput defining:
and on running it, it contains:
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
So, Spark DropDownList and Spack ComboBox prevent the application from running because of that compile error.
Never mind; folks, I found the problem.
The original definition of the DropDownList was:
<s:DropDownList x="270" y="220" id="continentDropdown" width="112">
If you look carefully, there is a closing bracket at the end of the first line. That ends the definition of the component. That was the problem. When I removed that, it worked fine.
I should have noticed this before, or perhaps FlexBuilder could have said something like "dataProvider is out of place" or some such, which might have told me what the issue was a couple days ago, but whatever, it's fixed now.
Thanks to the repliers.
File a bug at bugs.adobe.com/jira. Maybe the compiler can get smarter about