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

Ability to specify compiler switches/conditional content in mxml

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      When working on a project that has ant build scripts and/or debug versus release code variations, it is easy to exclude/include different code using compiler switches in actionscript. I have enountered times when this feature would be useful in mxml also.
      Example (I have no idea whether the fx:Compiler tag makes sense here or not, just including it as a potential approach for implementation):

      <fx:Compiler switch="CONFIG::ide">
      <md:MonsterDebuggerFlex/>
      </fx:Compiler>
      

      the above example would have the CONFIG::ide switch set in the IDE compiler settings and could be set to false (for example) in an ant build script.

      another example could be the inclusion of some live dev info populated via normal mxml bindings etc in a group over the top of the Main application that is defined in mxml. This could be compiled in for CONFIG::dev builds but not for CONFIG::release, for example.

      Maybe I have missed some other obvious way to do this, but if not, I think it could be an improvement that would presumably be useful for current swf based flex and flexjs etc.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gregdove Greg Dove
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: