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

Please support "basedOn" property in Flex 4 States, and generally continue support for Flex 3 States syntax.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Later
    • Adobe Flex SDK Previous
    • None
    • States
    • None
    • Language Found: English

    Description

      Please see http://bugs.adobe.com/jira/browse/SDK-23655 for the steps to reproduce.

      We use States when extending MXML composite components, as a mechanism for manipulating the child components (adding, removing, modifying visual state) in the subclass. If the parent class already has States defined, we make new states that are "basedOn" the existing ones and then append them to the existing array of States. This is all done as part of an inversion of control scheme in which our services organization makes customized (extended) versions of our mxml components which are injected in place of the originals at run-time using Spring.

      We know that we could do all of this with pure ActionScript, but we much prefer the declarative MXML syntax for UI control definition - that's part of our UI group's best practices, and it's easier for the novice to work with.

      The use of States for adding children to extended MXML components is something of a workaround, but it works well. Unfortunately, the new States syntax really interferes with this workaround. With some work, we can still use the State object, but only if things like "basedOn" continue to work as expected.

      Of course, there's another good reason to continue support for Flex 3 States syntax: we'd like to start compiling against Flex 4 sdk, but we don't want to have to refactor all of our States in order to do so. We have a moderately huge app suite. I imagine we're not alone.

      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: