Hi,

Wonder if someone can help ?

I have the following code:

  var mciPrintFilter = new Array();
  var wholesalePrintFilter = new Array();
  
  if (result.length > 0){
   // Need to split up the returned array into two sub-arrays for filtering by 
customer type
   
   for (var i = 0; i < ModelLocator.printCreditList.length; i++){
    if (ModelLocator.printCreditList[i].ro_customer_type == 1){
     mciPrintFilter.push(ModelLocator.printCreditList[i]);
    } else {
     wholesalePrintFilter.push(ModelLocator.printCreditList[i]);
    }
   }
   
   mx.core.Application.alert( "MCI: " + mciPrintFilter.length );
   mx.core.Application.alert( "MCIW: " + wholesalePrintFilter.length );
   mx.core.Application.alert( "ALL: " + ModelLocator.printCreditList.length );

  }

-----

The problem seems to be that the lengths for each of the arrays at the end is 
exactly the same! It seems that mciPrintFilter and wholesalePrintFilter share 
the same memory space or something - since I also tried commenting out that 
loop, inserting one element from printCreditList into mciPrintFilter and then 
checking the length of wholesalePrintFilter - and it increases by one!

Pretty certain I'm doing something dumb ;-)

Can anyone help me out please ?!

Thanks,

Jamie.






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
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/

<*> 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