Jump to content
Larry Ullman's Book Forums

Recommended Posts

I want to convert an XMLList into an Array (not an ArrayCollection). I do understand that an ArrayCollection is actually only a wrapper around an Array & at the heart of an ArrayCollection is in fact an Array.

At this stage I can convert the XMLList into an ArrayCollection like so:

testInfo = event.result.node; // testInfo is an XMLList

myData = new ArrayCollection(mx.utils.ArrayUtil.toArray(testInfo.LoadType)); // myData is an ArrayCollection.

 

Testing (component implementation), the only way I’ve been able to access the content (stripped of start & end XML tags) is like so:

In a combobox: <mx:ComboBox dataProvider="{myData.getItemAt(0)}" />

or in a List: <mx:List dataProvider="{testInfo}" labelField="LoadType"/>

If I use <mx:ComboBox dataProvider="{myData}"/> without the getItemAt(0)-part, the start & end XML tags are still included. Why???

 

The reason I want an Array is to ultimately use it in a PieSeries to bind to perWedgeExplodeRadius.

I'm using Flex 4 with FlashBuilder IDE.

 

Thanks.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...