aharui commented on issue #867: URL: https://github.com/apache/royale-asjs/issues/867#issuecomment-648293079
In #838, the data was XML. Is your data XML? It looks like it is a regular ByteArray. The data.at_Bytes ByteArray would be assigned to the DownloadButton.data, and the DownloadButton.defaultFileName would be assigned data.at_Name. In Flex, the LinkButton would be created at startup, and later the user would click on it, and the data.at_Bytes could have changed between startup and the click based on other things the user did, including other code that could run when the user clicked on the LinkButton. In Royale, the DownloadButton is created at startup and the data and defaultFileName must be set before the DownloadButton sees the click event so it is harder to deal with changes to the ByteArray based on what the user did after startup. I don't know when your code has made the ByteArray ready, but that is the point at which it need to be assigned to the DownloadButton's data property. It can't be done in the DownloadButton's clickHandler ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
