Hi, I have a colorpicker that I want to have his colors loaded from an external xml, my xml looks like this
<colors>
<color label="Aqua" colorHex="0xFFFFCC"/>
<color label="Forest Green" colorHex="0xCCFF00"/>
<color label="Kelly Green" colorHex="0xCCFF00"/>
<color label="Royal Blue" colorHex="0xCCFF00"/>
<color label="Columbia Blue" colorHex="0xCCFF00"/>
<color label="Navy Blue" colorHex="0xCCFF00"/>
<color label="Purple" colorHex="0xCCFF00"/>
<color label="Maroon" colorHex="0xCCFF00"/>
<color label="Cardinal" colorHex="0xCCFF00"/>
<color label="Garnet" colorHex="0xCCFF00"/>
<color label="Red" colorHex="0xCCFF00"/>
<color label="Orange" colorHex="0xCCFF00"/>
<color label="Texas Orange" colorHex="0xCCFF00"/>
<color label="Light Gold" colorHex="0xCCFF00"/>
<color label="Vega Gold" colorHex="0xCCFF00"/>
<color label="Brown" colorHex="0xCCFF00"/>
<color label="Black" colorHex="0xCCFF00"/>
<color label="Silver" colorHex="0xCCFF00"/>
<color label="White" colorHex="0xCCFF00"/>
<color label="Pink" colorHex="0xCCFF00"/>
</colors>
so I load the xml, added to a bindable variable with type xml and added to the dateprovider of the colorpicker like this
[Bindable] private var colorsDp:XML;
colorsDP = XML(loader.data);// the loader is an object that has the xml loaded
<mx:ColorPicker id="cp" dataProvider="{colorsDp}" labelField="label" colorField="colorHex" editable="false"/>
the docs said that I can use for the dataprovider as an xml, array, arrayCollection, xmlListColletion, etc, because the dataprovider convert to data to an ICollectionView, but doesn't work, why??