Nimai Malle created FLEX-35060:
----------------------------------

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


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)

Reply via email to