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

can the -define switch used for conditional compilation take in a DATE value ?

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Later
    • Adobe Flex SDK 4.5.1 (Release)
    • None
    • MXML Compiler
    • None
    • Language Found: English

    Description

      I read about the -define switch for the mxmlc compiler, and how it could be used for conditional compilation. Really cool stuff. I was wondering if there was a way to pass in the current date ( the date of compilation ) into the SWF, using Flex Builder.

      An example scenario:

      I make nightly builds of my application, during development phase. The app would have a label which indicates the build date (a timestamp) which helps identify the build version. If I implement this today, I will have to manually edit the label's text property before I do a compile. Being a manual process, this is highly error prone. There are high chances that this gets forgotten and builds end up showing previous build's date.

      By being able to pass in the current date via flex builder, I can just set the flex builder option to pass in an additional compiler option like

      -define debug::compileDate. %DATE%

      and the flex compiler would pass in the compilation date ( ideally the timestamp) into the SWF.

      This could be used for more than just debugging, it could be used for verification of two related SWFs - like a application SWF and a module SWF, or CSS SWF for example.

      I'm aware that this can be achieved using ANT to build the SWF, but just because a user wants to use this capability, he shouldn't have to change his usual FlexBuilder workflow.

      Thanks for your time!

      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: