yishayw commented on issue #143: Wrong "this" in Function given as Param
URL: https://github.com/apache/royale-compiler/issues/143#issuecomment-612352271
 
 
   > Apologies for arriving late to this issue. Can someone explain the need 
for conditionalBind() and when it would be used? The issue from looking over 
the source (I haven't debugged into it), is that expressions like 
`parentApplication.buttonFunction;` must be strongly typed. Properties that are 
of type `Object` or `*` like `parentApplication` cause the compiler to lose 
track of the types of things so the code paths you want in the transpiler don't 
get hit. The correct code would look more like:
   > 
   > `(parentApplication as Example).buttonFunction;`
   
   This doesn't seem to work when parentApplication is referenced from a module.
   
   Getting
   
   SystemManager.js:232 Uncaught TypeError: Cannot read property 'mixins' of 
undefined
       at Main_mx_managers_SystemManager.mx.managers.SystemManager.start 
(SystemManager.js:232)
       at index.html:491

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