Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-28884

E4x Selector when parsing metadata via describeType

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Adobe Flex SDK 4.5 (Release)
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

      Description

      Steps to reproduce:
      1.Add a custom metadata to a class method, ensure that its added to -keep-as3-metadata+=

      {CustomMetadataName}

      2. use flash.utils.describeType to reflect the class
      3. try to find the method by doing xml.methods.metadata.(@name==

      {CustomMetadataname}

      )

      public class TestClass{

      [External]
      public function foo():void{

      }
      }
      4.5 describeType

      <method name="ext_connectToStream" declaredBy="com.conceptualideas.chat.delegators::ViewerDelegator" returnType="void">
      <parameter index="1" type="String" optional="false"/>
      <metadata name="External"/>
      <metadata name="__go_to_definition_help">
      <arg key="pos" value="1861"/>
      </metadata>
      </method>
      for each (var method:XML in methods)

      { trace(method.metadata.(@name =="External")) == nothing trace(method..metadata.(@name=="External")) == nothing trace(method..metadata.(@name=="External").length) == nothing trace(method.metadata.(@name=="External").length) == nothing }

      3.5 describeType
      <method name="ext_connectToStream" declaredBy="com.conceptualideas.chat.delegators::ViewerDelegator" returnType="void">
      <parameter index="1" type="String" optional="false"/>
      <metadata name="External"/>
      </method>
      for each (var method:XML in methods)

      { trace(method.metadata.(@name =="External")) == found trace(method..metadata.(@name=="External")) == found trace(method..metadata.(@name=="External").length) == 1 trace(method.metadata.(@name=="External").length) == 1 }

      Actual Results:
      Return the node found

      Expected Results:
      output the found metadata node

      Workaround (if any):
      method.metadata.(@name =="External").@name == "External"

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              adobejira Adobe JIRA
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: