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

MXML compiler setting explicit stated defaultProperty

    XMLWordPrintableJSON

    Details

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

      Description

      Steps to reproduce:
      1. Create a class with a property of type Vector.<X> where X is a class. Generate getters and setters for named property.
      2. Set the property as default property using MXML tag.
      3. Create an MXML file that uses the class in its declaration tag and fill out the vector using MXML syntax (set up Y elements).
      3.1 Fill out the vector using the explicit default property. This we call version 1.
      3.1 Fill out the vector using the implicit default property. This we call version 2.
      4. Use the MXML class in a runnable document class.
      5. Have the runnable document class print the length of the vector.

      Actual Results:
      The compiler should generate the vector as stated in the MXML class. The length of the vector should be Y.

      Expected Results:

      • When using version 1 (see step 3.1) the compiler never generates the code that fills out the vector. Thus the length will be zero.
      • When using version 2 (see step 3.2) the compiler generates the vector as expected.

      Workaround (if any):
      Always fill out default properties using implicit reference.

      Consequence of bug:

      • Default property must be used where vector is used (to ensure it always works). Always refer to the default property implicitly.
      • You can only have one vector exposed in any one class if you want to use MXML to target it. VERY BAD!

      Please help me solve this!

      HOW TO READ THE ATTACHED EXAMPLE:
      The versions (1 and 2) have been suffixed with _V1 and _V2 respectively. See mainly the classes "BugReportObject.mxml" and "com.netent.common.fsm.BasicFSM". For the erroneously generated code by the compiler, see classes in bin folder and look at the method called "_BugReportObject_BasicFSM1_i".

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: