Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 07-07-2008, 01:05 AM   #1
kminev
Senior Member
 
Join Date: Jun 2008
Posts: 129
Default Array collection sort

I have a web service which returns xml data to my flex chart and then I convert the xml to ArrayCollection. I have the following xml structure:

<NFS>
- <Trade>
<OrNo>0000000Y</OrNo>
<Date>6/10/2008 6:25:00 AM</Date>
<IP>xx.xxx.xx.xxx</IP>
<Ex>CBOT-A</Ex>
<A>Add</A>
<Trd>xxx</Trd>
<W2G>15</W2G>
<W2E>15</W2E>
<G2E>0</G2E>
</Trade>
</NFS>

When I load my data to the chart I need to separate the data on 3 different chunks. The field that I need to sort by is <A> .

Do I have to do that with a loop and if the <A> is met then assign the values to the chart series. Any idea how would be the most efficient way of doing it.

Perhaps I can do it with my xml as well.

Thanks in advance for any ideas.
kminev is offline   Reply With Quote
Old 07-07-2008, 01:31 AM   #2
box86rowh
FLEX AND FLASH ARE COOL
 
Join Date: Oct 2005
Posts: 794
Default

you can use xpath queries on the data to filter your data. Just research xpath and e4x
box86rowh is offline   Reply With Quote
Old 07-07-2008, 02:36 AM   #3
kminev
Senior Member
 
Join Date: Jun 2008
Posts: 129
Default

Does xpath and e4x also works for array collections or only for xml based objects?
kminev is offline   Reply With Quote
Old 07-07-2008, 04:12 AM   #4
box86rowh
FLEX AND FLASH ARE COOL
 
Join Date: Oct 2005
Posts: 794
Default

it will work just for xmlLists and xml objects
box86rowh is offline   Reply With Quote
Old 07-07-2008, 01:59 PM   #5
kminev
Senior Member
 
Join Date: Jun 2008
Posts: 129
Default

Can I sort my array collection using the AMF I just heard that amf is for data objects and it is much faster than dealing with xml objects. Anybody who knows a good reference on the web with AMF samples?

Thanks
kminev is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to sort an array based on a value of the objects in the array fantasio ActionScript 1.0 (and below) 7 01-06-2009 07:25 AM
Help with a Unique Array Sorting/Randomization Problem TheMediaBoy ActionScript 2.0 4 11-27-2008 09:37 AM
Applying sort ascending and descending to the same array??? bittman ActionScript 2.0 2 12-16-2004 12:38 PM
problem creating mc instance names inside a function jasonyen ActionScript 2.0 10 12-08-2004 12:01 AM
trouble with variable getting lost whoo Simple Stuff (Newbies) 2 08-07-2004 05:52 PM


All times are GMT. The time now is 07:29 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.