yishayw commented on issue #143: Wrong "this" in Function given as Param
URL: https://github.com/apache/royale-compiler/issues/143#issuecomment-610947462
 
 
   > Workaround is to replace
   > `(c as MyButton).clickFunction = parentApplication.buttonFunction;`
   > with
   > `(c as MyButton).clickFunction = 
goog.bind(parentApplication.buttonFunction, parentApplication);`
   
   Looks like changing the compiler to automatically do this is not a good idea 
because the first argument in goog.bind could be null which would cause a 
runtime exception.
   
   Suggestions on how to fix this are welcome.

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


With regards,
Apache Git Services

Reply via email to