The "self = this" needs to be more clever, you are correct. At one point in my race to understand all things ASJS it was probably convenient to add this to each function body and use "self" instead of "this". JS does require a lot more "this" than AS, so adding one reference or another didn't seem like a big deal, especially since "self" is more certain. Then again, since using 'goog.bind' for "this" references in nested functions is a good idea, it is certainly worth another look. Added to my list :-)
EdB On Tue, Apr 9, 2013 at 1:25 AM, Alex Harui <aha...@adobe.com> wrote: > Erik, > > I noticed that the FlexJS output has a lot of methods with “var self=this” in > it, and source has a comment implying that you wish it didn’t. FalconJS > currently adds “var self=this” only if there are nested functions inside. > What is the history behind the “self” in FlexJS output? > > -- > Alex Harui > Flex SDK Team > Adobe Systems, Inc. > http://blogs.adobe.com/aharui -- Ix Multimedia Software Jan Luykenstraat 27 3521 VB Utrecht T. 06-51952295 I. www.ixsoftware.nl