[TIMOB-13289] CodeProcessor: The this value for callbacks is incorrect
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-04-01T17:12:27.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.1.0, 2013 Sprint 07 JS, 2013 Sprint 07 |
Components | Code Processor |
Labels | n/a |
Reporter | Bryan Hughes |
Assignee | Praveen Innamuri |
Created | 2013-04-01T17:09:14.000+0000 |
Updated | 2017-03-16T20:57:41.000+0000 |
Description
The this value for callbacks (e.g. in addEventListener) are currently set to global scope, but should be set to the object the callback was added to.
Please provide test steps and sample code.
Run the following sample code from the command line (cannot run from studio) using "ti analyze -p iphone -A":
Sift through the output to find a line that starts with "[INFO] program output [log]:". Without the fix, it will say "[INFO] program output [log]: undefined" but with the fix it will say "[INFO] program output [log]: red".
Closing ticket as fixed.