aharui commented on issue #861:
URL: https://github.com/apache/royale-asjs/issues/861#issuecomment-643720569


   There are too many errors for me to take the time to address each one.  I am 
going to provide some information that you will have to combine with your 
knowledge of Flex to have the greatest impact on the number of errors, then we 
can discuss the leftover harder cases.
   
   First, all of your MXML files need to converted like the main app.  You have 
to change the mx namespace URI and add the fx namespace URI and convert some 
tags like Style, Script, and Metadata to fx.
   
   Some issues, like the CSS and States is due to differences between Flex 3 
and Flex 4.  Here is the documentation on the differences: 
https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/upgrading-flex3-to-flex4-techguide.pdf
   
   Problems like "import flash" should be described in the Royale 
documentation.  Flex and Royale are designed to be a layer above the Flash 
runtime so it should have been possible to write a Flex app without ever 
writing "import flash".  Royale is emulating Flex, not Flash, so where your 
code uses "import flash", you will have to find a replacement for it.  Many 
things have been emulated in mx packages like mx.net.FileReference, but not 
everything (at least not yet) so your team will have to consider how important 
that Flash feature was and what expense you want to go to in order to get it to 
work again.  
   
   Another group of errors is due to the fact that the JS runtime does not 
support weak reference listeners.  Many times weak reference listeners were not 
actually needed so your team will have to consider each usage and decide what 
to do.  If you think you really need weak reference listeners then describe the 
scenario in a separate issue.
   
   Another group of errors is because Royale does not currently have an 
emulation for Flash's Dictionary.  Many times it also isn't needed.  If you are 
not using weak-reference Dictionaries then you can often use an Object if the 
toString() is unique.
   
   Another group of errors is because DisplayObject is no longer the lowest 
level visual element.  Try using IUIComponent, UIComponent, or 
IFlexDisplayObject.
   
   Another group is use of getTimer().  You could replace it with `Date.now()`. 
 There is a `getDefinitionByName` in `org.apache.royale.reflection`.
   
   Make these changes and see what's left.
   
   


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


Reply via email to