Thanks I think I have to read into more about the array collection.

--- In [email protected], "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> I think you're confusing the ArrayCollection itself with the data items
> that it contains. An ArrayCollection has N items. It sounds like each
> item has a fkstate_id field. But which item in the ArrayCollection do
> you want to look at? You can get the ith item with
> _getNews.getItemAt(i).
>  
> Gordon Smith
> Adobe Flex SDK Team
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of tkskates
> Sent: Tuesday, January 22, 2008 4:10 PM
> To: [email protected]
> Subject: [flexcoders] working with an array collection
> 
> 
> 
> Hello I'm new to the group and flex I've been reading books and what not
> but I have a question probably simple for someone more experienced.
> 
> So here is what I want to do I have an array collection _getNews and I
> want to pull information out of it in the statesFilterFunction the field
> I want in the array collection is called fkstate_id so do I reference it
> like this
> 
> _getNews.data.fkstate_id
> or
> _getNews.fkstate_id
> 
> anyways i keep getting a 1119 error = access of possibly undifined
> property data through a reference with a static type
> 
> Any help would be great
> 
> Thanks
> 
> [Bindable]
> private var _getNews:ArrayCollection;
> 
> private function newsDataHandler(event:ResultEvent):void
> {
> _getNews = new ArrayCollection(event.result as Array);
> 
> }
> 
> private function statesFilter(_getStates:Object):Boolean
> {
> var currentCountry:Object = countryList.selectedItem as
> Object;
> return (currentCountry.country_id ==
> _getStates.fkcountry_id && _getNews.data.fkstate_id ==
> _getStates.state_id);
> }
>


Reply via email to