Input array affected by function even though it's not returned

I have it set up to call the array foalT 4 times to combine it with different results.  foalT is a multidimensional array with each element 4 elements long.   It works perfectly the first time the function is called foalTotal is correct.  The other times foalT is empty.  It appears the problem is happening when I use original.shift() and then recursively call the function but I have no idea why original is getting passed back into the foalT array.  Any help would be appreciated. 
var foalTotal:Array=Combine(foalWA,foalT);
var foalTSC:Array=Combine(foalWASC,foalT);
var foalTDC:Array=Combine(foalWADC,foalT);
var foalTBC:Array = Combine(foalWABC,foalT);
function Combine(cross:Array,original:Array):Array{
     var k:uint=0;
     var total:Array = new Array;
     trace("foalT Length:" + original.length);
     if (original.length!==0){
          for (var i:uint=0; i<cross.length; i++){
               for (var j:uint=0; j<=3; j++){
                    total[k]= cross[i].slice();
                    total[k].push(original[0][j]);
                    k++;
               }//end inner for
          }//end outer for
     original.shift();
     return (Combine(total,original));
     }//end if
     else
          return(cross);
}// end fuction

Flex does have some level of use of references, which you are experiencing in this case.
As the previous poster indicated, you need to clone the object in this case.

Similar Messages

  • I have a macbook pro version 10.7.5 and my mailbox will not open at all and comes up with a quit message even though it is not open. how can i get into my account. it works on my iPhone an i have internet and all other functions working on my computer

    I have a macbook pro version 10.7.5 and my mailbox will not open at all and comes up with a quit message even though it is not open. how can i get into my account. it works on my iPhone and i have internet and all other functions working on my computer

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter the name of the crashed application or process in the Filter text field. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, look under User Diagnostic Reports (not "Diagnostic and Usage Messages") for crash reports related to the crashed process. The report name starts with the name of the process, and ends with ".crash". Select the most recent report and post the entire contents—the text, not a screenshot. I know the report is long. Please post all of it anyway.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post other kinds of diagnostic report—they're very long and rarely helpful.

  • TS4532 My iPhone V will not connect to a Microsoft Exchange server. It says that the User Name or Password are incorrect even though they're not and I can log on directly to Exchange using the web browser. The connection worked until IOS 6.1.2 was Install

    My iPhone V will not connect to a Microsoft Exchange server. It says that the User Name or Password are incorrect even though they're not and I can log on directly to Exchange with the same parameters using the web browser.
    I bought the phone when it came out last October. The connection did not work at first, then started without warning in December. It worked perfectly for 2 months then stopped again when IOS 6.1.2 was Installed.
    Help please!

    I have forwarded these questions about the version of Exchange server that is being used and whether Microsoft host the mai themselves to the IT Dept but I will not get a reply from them until tomorrow.
    In the meantime I have also tried:
    Deleting and re-creating the account AGAIN!
    And re-setting the phone (recommended as a solution to a similar problem with an iPad in another forum.
    But please remember that:
    The phone would not connect for 2 months after I bought it
    Then started working unexpectedly in December
    Then stopped working again when IOS 6.1.2. was installed
    Also why am I the only person affected by this when colleagues with iPhone 3s and 4s who use the same mail system are not (I am still trying to find one with an iPhone V to see if their's works).
    Like I said I think that there must be a fault, either with my own phone or with iPhone Vs in general.

  • HT4617 Even though thunderbolt is not hot puggable in Bootcamp, is the use of mini displayport to vga/dvi still hot pluggable under Bootcamp?

    Even though thunderbolt is not hot puggable in Bootcamp, is the use of mini displayport to vga/dvi still hot pluggable under Bootcamp?

    This is Apple support on the subject
    http://support.apple.com/kb/HT4617
    Can I plug and unplug devices into a Thunderbolt peripheral that is already recognized?
    Yes. That is the best way to add and remove devices from the Thunderbolt chain while Windows 7 is running.
    Have you tried?

  • When i send an imessage to another person with imessage, my husband also receives the message, even though it was not sent to him.   We have always been on the same itunes account and not had this problem, however, when i added the ipad, this started.

    When I send an imessage on my ipad to someone, my husband also gets the message, even though he was not selected as a receipient.  This just started when I got my ipad and sent a message for the first time.  As a side note, my daughter received an itouch and both my husband and i were getting all messages she sent, no matter which one of us they were sent to.  I turned her imessage off.  We have all of our devices under the same itunes account so that we can share all music and apps.  How can we get around this?  I do not want him receiving all imessages that I send, this will get very annoying to him.

    You can have a separate AppleID only for iMessage and keep using the other one for iTunes.
    Just change the AppleID used for iMessage in Settings > Messages > Receive At

  • When i open iPhoto, it shows my iPod touch is connected even though it's not.

    When I open iPhoto, it shows that my iPod touch 4th generation is connected under the devices tab even though it is not.  Here is a screen shot of what it looks like.
    Then when I plug in my iPod, iPhoto still will not open, i still get the same screen image when i manually open it and it will not show me anything that is on the iPod.  I have tried unmounting it in the device tab and restarting iPhoto.  Any suggestions would be appreciated.

    well, kiss my grits!!  i feel like i am running a pc today.  after making this post i shutdown all my apps and then did a restart, and low and behold when i plugged in my ipod, iphoto opened and it recognized the photos.  go figure all it needed was a restart.

  • Apparently, BT are capping me even though I'm not ...

    Hey there, Recently I have been getting really slow speeds during peak times, I know you'll say "Thats what is meant to happen" and I know it is but my internet is going so slow that I can't load YouTube videos and play on Xbox LIVE from around 5:20pm till about 11:30pm all week. Sometimes even loading web pages is painfully slow. Heres something though: We are currently with Sky for Broadband. We called them up and we checked everything, It isn't Sky that is capping us because we checked our current speeds and sure enough I was getting the speed advertised therefore they said it was BT capping us. I have been livid because gaming doesn't take up much bandwidth, we can't upgrade our internet because we are outside Sky's network coverage area. So they said they'd reset something to get rid of the cap but that didn't work. So, from what I have seen and been told BT is capping us even though we are not with them and they are giving us slower speeds than what they cap their customers are. Shocking. Any Help?
    P.S we recently switched from BT because we kept being getting disconnected every 3 - 4 hours and we had no "cap" on Sky until about a month ago.

    Nizzyyy wrote:
    The reason that I was saying that it was BT is that Sky themselves told me BT was capping peoples speeds. My limit is 40GB which there is NO WAY I am hitting as I don't download much and I watch YouTube and do online Gaming which as I said doesn't take up much bandwidth. The possible reason Sky could have said that it was BT is because they control everything in my area. I will try other forums like this and report back
    I'm afraid Sky are lying to you. BT do *not* cap other operator/ISP connections.
    Sky are your provider, get onto their service desk and tell them to stop palming you off onto someone else. It is a Sky problem, not BT. If Sky don't have enough bandwidth to supply their customers, then that is a Sky problem, not BT. It doesn't matter if BT control everything or not, Sky are paying BT to use their equipment and bandwidth, if there is not enough - then it is Sky promising to deliver something they are unable.
    http://www.andyweb.co.uk/shortcuts
    http://www.andyweb.co.uk/pictures

  • I uninstalled Flash Builder 4.7 using the uninstall app.  I'd like to re-install the app, but Creative Cloud says it's up-to-date, even though it does not exist anymore on my computer.  How can I re-dowload it?

    I uninstalled Flash Builder 4.7 using the uninstall app.  I'd like to re-install the app, but Creative Cloud says it's up-to-date, even though it does not exist anymore on my computer.  How can I re-dowload it?

    CC desktop lists applications as "Up to Date" when not installed
    http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html

  • My daughter had completed a chart in pages. I saved it and then clicked on other chart types. Now I can't go back to the original chart she made even though I have not re-saved the file. How can I go back to her original chart with data?

    My daughter had completed a chart in pages. I saved it and then clicked on other chart types. Now I can't go back to the original chart she made even though I have not re-saved the file. How can I go back to her original chart with data?

    I don't get what you are saying.
    Is this all the same document?
    What version of Pages?
    Have you tried to revert to a previous version?
    Peter

  • My backed up files from iphone to my mac cannot be seen as they are, but only numbers and letters, they seem to be encrypted even though I did not click on encrypted when backing up

    I am using a Mac Book Air to back up my Iphone 5 on Itunes. What I can see of the files are encrypted even though I did not click on the Encrypt box.
    Please, help.

    Backups of an iPhone made using iTunes are stored in a format that is only meant for use in a restore and are not meant to be accessed directly. There are other methods of transferring things like photos and contacts to your computer such as iOS: Import personal photos and videos from iOS devices to your computer, iCloud: My Photo Stream FAQ, and https://www.apple.com/icloud/
    If you absolutely must directly access an iTunes backup there is 3rd party extraction software available such as http://www.wideanglesoftware.com/ibackupextractor/

  • When my phone is not plugged into the charger or computer, it will not turn on at all; even though it is not dead. When it's plugged into the computer, it will go to a white screen with a grey apple icon and then it will turn off again and repeat. IOS7

    When my phone is not plugged into the charger or computer, it will not turn on at all; even though it is not dead. When it's plugged into the computer, it will go to a white screen with a grey apple icon and then it will turn off again and repeat. IOS7 and iPhone 5.

    http://support.apple.com/kb/HT1808
    Try this step and if you cannot get your device into recovery mode there is a chance you have a hardware failure and you need to call apple to see what service options you have.

  • HT5934 How do I stop this update uploading to my mobile? Because I can't take any photos at all and the update is using up every inch of my mobile's space,not allowing me to keep all of my photos even though I've not got that many on there in the first pl

    How do I stop updates uploading on my mobile please? Because I cannot take any photos at all on it as the iOS update program 7.0.3 is hogging up every inch of my mobile's space, not allowing me to keep my photos even though I've not that many anyway. Help?

    Turn off Wifi in settings and then turn it on again; this will pause your device's update from updating.
    To stop automatic updates of applications, go to settings, Itunes&appstore, scroll down to automatic downloads and turn off updates
    Hope I've helped

  • Safari tries to connect to a hotel wifi even though we are not at the hotel the wifi is not listed in settings

    safari tries to connect to a hotel wifi even though we are not at the hotel. the wifi is not listed in settings

    Yes... tap Settings / Wi Fi

  • Itunes is my screensaver even though it's not supposed to be

    Ever since the last upgrade to the latest operating system, itunes pops up as my screensaver, even though it's not set to be.  I've deleted it and reinstalled it, but it's still happening.

    Hi 78rap,
    Windows 10 is still a preview version, so I suggest you submit a feedback to
    Windows Insider Program forum.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Is there a way I can get imessage on my iPod even though it's not the newest iPod touch, Is there a way I can get imessage on my iPod even though it's not the newest iPod touch

    Is there a way I can get imessage on my iPod even though it's not the newest iPod touch, Is there a way I can get imessage on my iPod even though it's not the newest iPod touch

    Hook it up to itunes and check the version. If it lists in the info that it is 5.0 or 5.0.1, then your ipod has imessage.
    If it turns out that an update is available, apply the update. Check your ipod version from Settings > General > About. Anything lower than iOS 5 won't have iMessage.

Maybe you are looking for

  • Oracle 9.0.1 on RedHat 7.1

    When installing Oracle 9.0.1 Database enterprise edition. I do encounter the following error in the make file, target install, ld cannot find -lclntsh. This is in the following makefile: OraHome1/plsql/lib/ins_plsql.mk. The file where is refered to,

  • C6 always wants to use g3 connections

    I would like to use wlan-connection with my nokia c6 when I'm going to internet. But when I start using the wlan-connection with my phone and open web-icon, the phone starts to use my operator's g3-connection. How can I make the definitions so that t

  • Still Image Quality is Poor after export

    Original images are all large digital images, Nikon 6.1 megapixel DSLR. Importing the images into Premier Elements 3.0 works fine, and in the editing screen, they look good. However, after either buring to a DVD directly from Premier or exporting and

  • I updated my 4 I-Phone and the I-tunes icon disappeared. How do I get it back?

    I updated my I-Phone 4 to the 6 and the I-Tune icon on the phone disappeared.  How do I get it back?

  • Edit postDelete postReport this postReply with quote create attachment for

    Hello all, i want to create an attachment for billing document. i read that i need to run 'SO_DOCUMENT_INSERT_API1' and 'BINARY_RELATION_CREATE' . but it would be very helpfull to see a code example. Thanks Moshe