[ https://issues.apache.org/jira/browse/FLEX-35060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Harui resolved FLEX-35060. ------------------------------- Resolution: Fixed Fix Version/s: Apache FalconJX 0.8.0 b41d4095987fc823421909e12b2964f3967f5e59 > Local function doesn't use self to reference class members > ---------------------------------------------------------- > > Key: FLEX-35060 > URL: https://issues.apache.org/jira/browse/FLEX-35060 > Project: Apache Flex > Issue Type: Bug > Components: FalconJX > Reporter: Nimai Malle > Fix For: Apache FalconJX 0.8.0 > > > The "self" var is defined but not used within localFunction to reference > class var "bar". > ///// ACTIONSCRIPT ///// > package { > public class foo { > internal var bar:String = "baz"; > public function foo() { > function localFunction(i:int) { > if (i==0) { > trace( bar ); > } > } > localFunction(0); > } > } > } > ///// JAVASCRIPT ///// > foo = function() { > var self = this; > function localFunction(i) { > if (i == 0) { > org.apache.flex.utils.Language.trace(bar); // Uncaught ReferenceError: > bar is not defined > } > }; > localFunction(0); > }; -- This message was sent by Atlassian JIRA (v6.3.4#6332)