i want to loop the records and compare the value "addresschange" to the PAYMENT 
Type Code if its the right one display it


--- In flexcoders@yahoogroups.com, "Paul Andrews" <p...@...> wrote:
>
> 
> ----- Original Message ----- 
> From: "Jason B" <nos...@...>
> To: <flexcoders@yahoogroups.com>
> Sent: Thursday, May 21, 2009 3:46 PM
> Subject: [flexcoders] Re: simple array?
> 
> 
> > Thanks but i dont know how to do a compare based on your example show?
> 
>  for(var i:uint = 0; i < records.length; i++) {
>  //If array matchs show text
>     if(payment_grid.selectedItem.PAYMENT_TYPE_CODE == 
> records[i].addresschange){
>         Alert.show(records[i].addresschange);
>     }
> }
> 
> 
> >
> >
> > for(var i:uint = 0; i < records.length; i++) {
> > //If array matchs show text 
> > if(payment_grid.selectedItem.PAYMENT_TYPE_CODE == records.valueof ????){
> >    Alert.show(records[0].addresschange);
> >
> > }
> >
> >
> >
> > --- In flexcoders@yahoogroups.com, Pedro Sena <sena.pedro@> wrote:
> >>
> >> records[0].addresschange
> >>
> >> You are putting an object inside your array
> >>
> >> Using records[0] you retrieve your object
> >> using records[0].addresschange you access its property called 
> >> addresschange
> >>
> >> On Thu, May 21, 2009 at 11:14 AM, Jason B <nospam@> wrote:
> >>
> >> >
> >> >
> >> > var records:Array = new Array({
> >> > addresschange: "Remember to reset the station address.",
> >> > etc.....
> >> > });
> >> >
> >> >
> >> > Alert.show(records['addresschange']);
> >> > Alert.show(records[0]);
> >> > Alert.show(records.addresschange);
> >> >
> >> > how the heck can i access the item directly by index name?
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >> -- 
> >> /**
> >> * Pedro Sena
> >> * Systems Architect
> >> * Sun Certified Java Programmer
> >> * Sun Certified Web Component Developer
> >> */
> >>
> >
> >
> >
> >
> > ------------------------------------
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Alternative FAQ location: 
> > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> > Search Archives: 
> > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
> > Links
> >
> >
> >
>


Reply via email to