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

Asdoc throws errors for MXML component that includes a separate .as file.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • Adobe Flex SDK 4.1 (Release)
    • None
    • ASDoc Tool
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Firefox 3.x
      Language Found: English

    Description

      Steps to reproduce:
      1. Create a MXML component, say MyComponent.mxml
      2. Create a separate .as file and include it using <fx:Script source="MyComponent.as" />
      2. Make one or more members of the .as file private, protected or public, e.g a method: "public function test(): void { };"
      4. Attempt to create documentation with asdoc for the component.

      Actual Results:
      Error: The public attribute can only be used inside a package.
      For some reason asdoc seems to see the .as file as a separate entity, not part of MyComponent.mxml

      Expected Results:
      No errors. As I understand things, the .as file is being <included> into the mxml component at compilation. It should not matter whether the as3 code is inside <![CDATA[ ]]
      > tags within the .mxml file or an external file, both options should produce valid documentation for the class.

      Workarounds:

      • Solution 1 is to move the AS code into the MXML file. Kind of defeats the objective of using external .as files for MXML components in the first place.
      • Solution 2 is to have the MXML component inherit from a normal class file. That would mean no private members in the base class, only internal (meaning a separate package for the component to be safe) or protected.

      The problem persists in asdoc compiled from the svn trunk, (4.5.0 rev. 16942).

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: