Well the reason is because when trying to get to the
hitdata.item.(object) I cause problems when using XML. Since
everything in my app is dynamic I cannot hardcode the hitdata.item
statements in my dataTipformat function. So I cannot use
[EMAIL PROTECTED] or [EMAIL PROTECTED]  I have tried
hitdata.item.("@" + someVar), but it doesn't work.  I would be more
than happy to use XMLlist or XMLListCollection, but it causes problems
 with hitdata and other things....seems to cause more work later on
though it saves me from having to turn it into an ArrayCollection.

If you can tell me how to make XMLlist work using hitData.item
statement I would be greatful.

Thanks, J

--- In flexcoders@yahoogroups.com, "Douglas Knudsen"
<[EMAIL PROTECTED]> wrote:
>
> Curious, why convert to ArrayCollection at all?  you can pass XML
direct to
> a chart.  Any Class supporting the dataProvider attribute can except any
> Collection.
> 
> DK
> 
> On 10/23/06, Tracy Spratt <[EMAIL PROTECTED]> wrote:
> >
> >  Use for..in loop.
> >
> >
> >
> > See the examples:
> >
> > http://livedocs.macromedia.com/flex/2/langref/XMLList.html
> >
> >
> >
> > Tracy
> >
> >
> >  ------------------------------
> >
> > *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
> > Behalf Of *jnewport
> > *Sent:* Friday, October 20, 2006 4:56 PM
> > *To:* flexcoders@yahoogroups.com
> > *Subject:* [flexcoders] Re: array of arrays and XML
> >
> >
> >
> > Thanks for the quick response.
> >
> > I know its possible to loop over the XMLList, but I am not sure how to
> > do it. I have used the XMLListCollection, but then when I try to use
> > the XMLListCollection as a data provider I have use the "@" symbol as
> > you suggested below.
> >
> > Using the "@" cause more problems because when try to make my app
> > dynamic I have to try things like [EMAIL PROTECTED]) and it gets
> > messy when I have to try to capitalize things like
> > [EMAIL PROTECTED]({somevar}).
> >
> > So if you could help with how to loop through the XMLList it would
> > make my code much cleaner.
> >
> > Thanks, J
> >
> > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,
"Tracy
> > Spratt" <tspratt@> wrote:
> > >
> > > You can loop over the XMLList and build that ArrayCollection.
> > >
> > >
> > >
> > > Alternatively, you could use an XMLListCollection and do:
> > >
> > > var xlcBills:XMLListCollection = new
> > > XMLListCollection(myXMLBillsList.month.bill)
> > >
> > > ...no loop required. A labelField spec might be:@name or @Amount.
> > >
> > >
> > >
> > > I don't do charts yet so you are on your own there.
> > >
> > >
> > >
> > > Tracy
> > >
> > >
> > >
> > > ________________________________
> > >
> > > From: flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>
[mailto:
> > flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>] On
> > > Behalf Of jnewport
> > > Sent: Thursday, October 19, 2006 12:13 PM
> > > To: flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>
> > > Subject: [flexcoders] array of arrays and XML
> > >
> > >
> > >
> > > Hoping to figure this out. What I am trying to do is get a
result like
> > > this (ArrayCollection).
> > >
> > > public var expenses:ArrayCollection = new ArrayCollection([
> > > {Expense: "Taxes", Amount: 106976},
> > > {Expense: "Rent", Amount: 147776},
> > > {Expense: "Car", Amount: 79554},
> > > {Expense: "Gas", Amount: 39252},
> > > {Expense: "Food", Amount: 128351}
> > >
> > > from this XML:
> > >
> > > <list>
> > >
> > > <month monthname="Jan-04" income="14000263" average="80052">
> > > <bill name="Taxes" Amount="106976" customers="25670"/>
> > > <bill name="Rent" Amount="147776" customers="25670"/>
> > > <bill name="Car" Amount="79554" customers="25670"/>
> > > <bill name="Gas" Amount="39252" customers="25670"/>
> > > <bill name="Food" Amount="128351" customers="25670"/>
> > > </month>
> > >
> > > </list>
> > >
> > > Then use it to plot data on a piechart. I am pulling the xml in
via a
> > > httpservice. So I am guessing I need to iterate through the xml and
> > > create an arrayCollection of arrays? But I can't figure that out.
> > > Then how to use the Expenses:arrayCollection as a piechart
dataprovider.
> > >
> > > Thanks in advance.
> > >
> >
> > 
> >
> 
> 
> 
> -- 
> Douglas Knudsen
> http://www.cubicleman.com
> this is my signature, like it?
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to