You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2019/02/05 05:26:30 UTC

[GitHub] aharui commented on issue #384: Cannot find Vector. methods

aharui commented on issue #384: Cannot find Vector.<T> methods
URL: https://github.com/apache/royale-asjs/issues/384#issuecomment-460517532
 
 
   I decided to start by adding an option to the compiler so someone like you can provide an alternative Vector implementation.  This allows me to avoid dealing with copyright issues from the code you posted above.  So, in theory, if you add -js-vector-emulation-class=<some class> to the compile options, the compiler will stop outputting Arrays and calls to Language.Vector and instead create instances of the specified class.  The output expects a constructor that takes 3 parameters:
   An array of initial values, the String name of the Vector's type, and an optional boolean if the "fixed" argument is supplied in the code being transpiled.
   
   I might have missed some cases, but in theory you should be able to shim the AS3 Vector to your VectorData or some variant.
   
   The compiler will currently map insertAt/removeAt to splice calls.
   
   By letting folks like you supply a Vector emulation you can make it as light or heavy as you want and not have to wait for us to update our emulation.  We may get around to an emulation or two someday if folks ask for it, or they might come asking for yours.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services