File download code works without error, but no file is downloaded

Hello,
I have a very strange problem -- I am trying to download a
simple file from a server, using virtually identical code to what
is in the FileReference.download() examples. My code executes
flawlessly, I get the browse window to select the location to save
and name of the file, as expected. I click "Save" in the file
dialog, and the window disappears -- but no file. I know my URL is
right, because I can test the URL from the browser, and I get the
file back. But here's the even weirder thing: I threw TCPMon in
between Flex and the server, and discovered that the
FileReference.download() method isn't even sending a request to the
server. If I try the exact same URL through a browser, TCPMon shows
both the request and response. But Flex never registers a request
at all.
Help! I have 100% error free code that follows the
documentation examples but doesn't request or download the file.
Your help is appreciated!
Thanks,
Brad

I found the answer to my problem, but now I want to know WHY
this is, and if it is considered a bug by Adobe -- if anyone out
there has an explanation, that would be great.
I implemented the full set of event handlers, and guess what
-- not only was I not getting any HTTP request being made, but I
also didn't get any event callbacks. Bottom line, I think I found
an Actionscript bug.
The answer to the $64,000 question is this: when the
FileReference object goes out of scope (I had it declared locally),
because the download() call is asynchronous, it doesn't call event
handlers or make a request. It must be garbage collecting it. So
you have to have your variable as a member, not a local variable.
Weird. I find no other objects in Actionscript work like that. I
wonder if it has something to do with the fact that the call
crosses the native boundary (because it is leaving the Flash
sandbox, and interacting with the browser/native OS.
To me, that's like prematurely killing a thread before it has
completed processing just because it has no parent object with a
reference to it. In general, most rules for garbage collection I've
seen in various platforms require either a parent object or thread
of processing to prevent cleanup.
If anyone has an explanation, I'm all ears!
Thanks,
Brad

Similar Messages

  • I believe I have implemented it correctly but I am not receiving the notifications on my phone. I have an ad hoc provisioning profile set up.  I have the device token from the phone through NSLOG to console. I have the dot net code running without errors.

    I believe I have implemented it correctly but I am not receiving the notifications on my phone. I have an ad hoc provisioning profile set up.  I have the device token from the phone through NSLOG to console. I have the dot net code running without errors.The notifications just don’t appear.
    Any ideas where I am going wrong?

    IMAP account access by itself does not provide for syncing contacts, calendar events, and notes or anything over the air. This is possible with an Exchange account accessed via ActiveSync with the Exchange Server.
    If your company email account is an Exchange Account, your company's IT Dept. has enabled IMAP account access for your Exchange account on the Exchange server?
    If an Exchange account, the IT Dept. must have ActiveSync enabled for your account on the Exchange Server to create and access the account as an Exchange account which provides Push access for received messages, and over the air syncing for contacts and calendar events with the Exchange Server.

  • Cash Management - AutoRecon without errors, but still unreconciled?

    Hi guys,
    Pretty interesting question:
    I have multy period's bank file (transactions for 3 accounting periods), all settings are according the manual on AP and CM sides done.
    Statement's Import finished without errors, AutoReconciliation finished without errors, but Statement still have status UNRECONCILED and on AP side transactionsin ap_checks_all table still have STATUS_LOOKUP_CODE as NEGOTIABLE, and CLEARED_AMOUNT, CLEARED_DATE, REQUEST_ID, CLEARED_ERROR_AMOUNT and ACTUAL_VALUE_DATE fields are still empty.
    The periods were OPEN at the time of a run.
    Only when I go to the Statement in CM and open the lines and reconcile them one by one it works.
    Please advise, any help will be appreciated!
    Bok

    Hi,
    Step: 1
    Check the System parameters Auto Reconciliation Setups
    Step: 2
    Check the Bank Statment line has Bank Transaction Code attached
    Step: 3
    Check the Document number given in Bank Statement line is matching exactly with the Payment/Receipt
    Step: 4
    Check the Bank Code attached to line is same as the available line you are trying to match i.e. RCT to Receipt, PMT to Payment etc
    Step: 5
    Assign MO: Security Profile Option to your user id
    Run Autoreconciliation Program now. The issue should be resolved.
    Regards,
    Sridhar

  • Flash player has been installed multiple time without errors but bbc news website and even flash player help say it isn't. How do i get out of this loop? - using windows 7 ultimate and latest IE11

    flash player has been installed multiple time without errors but bbc news website and even flash player help say it isn't. How do i get out of this loop? - using windows 7 ultimate and latest IE11

    I have had the same problem for WEEKS and I cannot access any sites that use Flash. Flash has been installed on this computer since I bought it in 2012. I have allowed auto updates but for weeks the updates never get past Step 2 - is this because I do NOT want the Google Tool bar? I use NO tool bars as there is only 6 inches of vertical screen space. Is this because I uncheck wanting Chrome as a default browser?  It is already installed, I just don't use it.  I came to this site and ran the check is it installed and the system says it is either not installed or not enabled. Version 14 just downloaded about 30 minutes ago - but did not progress to Step 3 although a pop up screen came up with a finish button, which I clicked. WHAT is the problem and how do I fix it?  If this were just a compatibility bug between IE11 and Adobe they have had plenty of time to fix it.
    Stephanie HC

  • HT1539 I entered the download code for"THE HOST"but instead I got a copy of"Spring Breakers".How can I correct this?  I called a friend that has"Spring Breakers"and the codes are not even remotely alike!!! I did not want to download what I received!!What'

    I entered the correct download code for "THE HOST" but instead got a copy of "SPRING BREAKERS"! All of the prompts identified it as "The Host" but the final product was "Spring Breakers"! I called a friend who has a copy of that movie and the download codes are not even remotely alike!! How can I correct this error? I 'd rather have SyFy that a bubblegum teenager flick!! HELP ME, PLEASE?!

    Hello Old Dogg new tricks,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at this article:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    http://support.apple.com/kb/ht1933
    Best of luck,
    Mario

  • I'm trying to download a movie on my mac book air, but every time i try to download it it says error 8003 and won't download the movie.

    I just got a Mac Book Air and am trying to download a movie, but every time i try to download it it says error 8003 and will not download the movie.

    Hello skiier4life,
    Thanks for using Apple Support Communities.
    To troubleshoot this issue where you are receiving error 8003 in iTunes when trying to download content from the iTunes Store, please follow the troubleshooting steps in the article linked to below as error (-50) is the same as error 8003.
    iTunes Store: "Error (-50)" when downloading purchased content - Apple Support
    Cheers,
    Alex H.

  • HT4519 how do i get my server email to send pictures.  Email works without pictures, but when attaching a picture the mail will not send

    Email works without pictures, but when attaching a picture the mail will not send

    Hi,
    In Mail > Preferences > Accounts to can find out which STMP server you are using for outgoing items.
    This can be one account.
    I do this with a dial Up account I still have access to.
    I can "fetch" mail over DSL and now Fibre.
    However I have to be Logged in via Dial up to actually use their Servers to Send.
    As a Consequence I "send" via one of the other Accounts STMP servers.  (I tend to add a signature that reflects this account change)
    The other thing that might explain what you are seeing is the Full Name Box.
    8:38 PM      Monday; April 8, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Illustrator trial download doesnt work says error(-1) set up encountered error

    illustrator trial download doesnt work says error(-1) set up encountered error any 1 else has this problem

    Thsi would help.
    http://helpx.adobe.com/x-productkb/policy-pricing/download-assistant-faq.html
    Alternately you can follow the steps listed at http://forums.adobe.com/thread/981369 to initiate a direct download.

  • My iPad is downloading my video purchases automatically, but it's only downloading two episodes from Supernatural S10 that I have watched and deleted. I can't stop it from downloading, and I can't download anything else because of it. Help!

    My iPad is downloading my video purchases automatically, but it's only downloading two episodes from Supernatural S10 that I have watched and deleted. I can't stop it from downloading, and I can't download anything else because of it. I don't know what to do. There is some sort of glitch happening and it's really affecting my iPad. I've tried letting it download but before it completes, it says it is unable to complete process and asks me to try again. I am on a limited interest data plan and can't afford these downloads to continue. What can I do?

    Have you tried deleting the App within the Settings menu (rather than from the Home Screen)?
    Settings>General>Usage>
    From the Apps list, find the App (press "Show all Apps" if the app is not in the immediately shown list), tap on the app you wish to delete, then tap "Delete App"

  • When I try to download iTunes, I get error message indicating that the download is for 32-bit, whereas I need 64-bit. How do I download 64-bit iTunes?

    When I try to download iTunes, I get error message indicating that the download program is for 32-bit, whereas I have 64-bit. How can I download 64-bit iTunes installer?

    What version of windows do you have ? 64 bit only exists for Vista and Windows 7, not for XP (http://support.apple.com/kb/DL1047)

  • I have several iCloud shared photo streams . They all download fine into my iPhone, but one doesn't download into my MacBook. Any suggestions?

    I have several iCloud shared photo streams . They all download fine into my iPhone, but one doesn't download into my MacBook. Any suggestions?

    Tried that too over the weekend,I unchecked the Photos option in iCloud preferences in System, let iPhoto do it's thing, then restarted the Mac, and turned iCloud Photos back on again... it looked promising the first hour... but then stopped downloading 20 or so albums. I have over 80 shared albums created over the years.
    Also, the albums it did download, sometimes they're not even complete nor in any particular order.
    I did exactly what you did. It took two days, but slowly all shared streams came back.
    If the photo streams do not reappear, try if removing the content of this folder will help: It contains the photos downloaded from the shared streams. Perhaps one photo is corrupted.
    ~/Library/Application Support/iLifeAssetManagement/assets/sub-shared/
    Quit iPhoto
    Move the folder above from your User Library to the Trash.
    Restart your Mac.

  • I keep getting the message when I open Muse CC, that the latest version is here and that i need to download it... But when i click "Download Latest Version" and it takes me to the applications manager it tell me that Muse is "Up to date"..... I also downl

    I keep getting the message when I open Muse CC, that the latest version is here and that i need to download it... But when i click "Download Latest Version" and it takes me to the applications manager it tell me that Muse is "Up to date"..... I also downloaded a template from Muse and it tells me when I open it that i also need the latest version... Can anyone explain why Iam getting this message and Why I can not up date?... Much appreciated

    Download the creative cloud desktop app using the below link:-
    Download Adobe Creative Cloud apps | Free Adobe CC trial
    And then check if you get install Button for Muse CC 2014.3
    Regards,
    Neha

  • In Quicktime Pro I try to create a mov file and I get an error "-43 a file could not be found".  Any ideas?

    In Quicktime Pro I try to create a mov file and I get an error "-43 a file could not be found".  Any ideas?

    I have a similar problem which i did not have before...and it exists only in some powerpoint files which i want to print as a pdf file...and i get the same message as above.
    the log says the bellow details...what's the problem and how can i resolve it? thanks.
    %%[ ProductName: Distiller ]%%
    %%[Page: 1]%%
    %%[Page: 2]%%
    Cambria not found, using Courier.
    %%[ Error: invalidfont; OffendingCommand: show ]%%
    Stack:
      %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%

  • I cannot download in-app purchase  . I'm live in Thailand and download in thai store only   but i  can not download in-app  . My appleID name Cradit and user long time

    Hi...
           I cannot download in-app purchase  . I'm live in Thailand and download in thai store only   but i  can not download in-app  . My appleID name Cradit and user long time help me please .  Thank you

    What happens when you try?
    Any info about your issue at all?

  • My power went off and I have lost a word file I was working on. Was this file saved automatically anywhere where I can retrieve?

    My power went off and I have lost a word file I was working on. Was this file saved automatically anywhere where I can retrieve?

    It may have been if you had autosave activated.  I've never had that happen so I don't know where the file is put.  I would expect Word would ask you if you wanted to retrieve a saved version when you next started it in those circumstances.

Maybe you are looking for