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 2020/12/16 15:45:45 UTC

[GitHub] [royale-asjs] estanglerbm opened a new pull request #1009: Implement ObjectProxy.object as a workaround to do "for each" and "for" on ObjectProxy.

estanglerbm opened a new pull request #1009:
URL: https://github.com/apache/royale-asjs/pull/1009


   For Proxy or ObjectProxy, the compiler will generate a call to propertyNames() for both:
   
   ``for each (value in objproxy)``
   and
   ``for (key:String in objproxy)``
   
   For the second case, key is then equal to a number, instead of the key name.  (For the first case, traditionally you would modify getProperty() to take a number-string argument and return the appropriate value, and it's used automatically.)
   
   As a workaround for both cases for ObjectProxy, the "object" (legacy) property is implemented, so you can do this instead:
   
   ``for each (value in objproxy.object)``
   and
   ``for (key:String in objproxy.object)``
   
   Not convenient enough, but it works.  This is only for the JS side;  it doesn't work on SWF (because object_proxy designation is protected), in Royale or Flex.
   
   (Legacy "object" property is protected, not public, but JS side is already exposing several other protected functions--in this class and others--as public.)
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [royale-asjs] estanglerbm commented on pull request #1009: Implement ObjectProxy.object as a workaround to do "for each" and "for" on ObjectProxy.

Posted by GitBox <gi...@apache.org>.
estanglerbm commented on pull request #1009:
URL: https://github.com/apache/royale-asjs/pull/1009#issuecomment-746681854


   Abandoning for a better approach.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [royale-asjs] estanglerbm closed pull request #1009: Implement ObjectProxy.object as a workaround to do "for each" and "for" on ObjectProxy.

Posted by GitBox <gi...@apache.org>.
estanglerbm closed pull request #1009:
URL: https://github.com/apache/royale-asjs/pull/1009


   


----------------------------------------------------------------
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:
users@infra.apache.org