[
https://issues.apache.org/jira/browse/FLEX-35071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Harbs reopened FLEX-35071:
--------------------------
Assignee: Alex Harui
It looks like it's still not working correctly:
{code:actionscript}
private var xml2:XML = new XML('<root
xmlns:fz="http://ns.adobe.com/mxml/2009"><a><b/></a><a
name="fred"/><a>hi<b>yeah!</b></a><a name="frank"/><c/></root>');
private function runTest():void{
var list3:XMLList = xml2.descendants();
list3 = list3.(attribute("name").length());
}
{code}
outputs:
{code:javascript}
var /** @type {XMLList} */ list3 = this.xml2.descendants();
list3 = list3.filter(function(node){return
(node.this.attribute("name").length())});
{code}
I'm not sure if this is related to the original xml being declared in a
different scope.
> Extra "this" causing error
> --------------------------
>
> Key: FLEX-35071
> URL: https://issues.apache.org/jira/browse/FLEX-35071
> Project: Apache Flex
> Issue Type: Bug
> Components: FalconJX
> Reporter: Harbs
> Assignee: Alex Harui
> Fix For: Apache FalconJX 0.7.0
>
>
> The following E4X expression:
> list3 = list3.(attribute("name").length());
> compiles to the following (which results in an "undefined" error)
> list3 = list3.filter(function(node){return
> (node.this.attribute("name").length())});
> It should compile to the following (which works as expected)
> list3 = list3.filter(function(node){return
> (node.attribute("name").length())});
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)