So in my Flex 3 project I have an ArrayCollection, like this:

[Bindable]
private var myDataProvider:ArrayCollection = new ArrayCollection(
        [ 
                {country:"Apple", quantity:5},
                {country:"Pear", quantity:3},
                {country:"Banana", quantity:7},
        ]);

This is the dataprovider for another visual component (this is not the
actual data, I've simplified it for the sake of clarity in asking this
question).  I have some checkboxes that I want to use to toggle elements
in and out of the arrayCollection, thus changing what's shown in the
visual component which is bound by databinding.  I thought about just
having a visual property in the dataprovider, but then found out I
cannot access display list items in this third party chart component I
am using, so the only way to change what is shown in the chart component
is to change what's contained in the array collection.

My question is, while I can think of ways to do this (adding and
removing elements in the ArrayCollection), but they all involve some
pretty ugly Actionscript.   Is there a good way to handle this, but keep
my data intact?  How would you use checkboxes to toggle data in and out
of the ArrayCollection elegantly?

Thanks,

Jason Merrill
Bank of America   <<Picture (Device Independent Bitmap)>>
Instructional Technology & Media   *   GCIB & Staff Support L&LD

Interested in Flash Platform technologies?  Join the Bank of America
Flash Platform Developer Community
<blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default.as
px>  
Interested in innovative ideas in Learning?  Check out the Innovative
Learning Blog
<http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx>
and subscribe
<http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7D&Source=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx> .






<<attachment: ole0.bmp>>

Reply via email to