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

MXML Compiler inappropriately trims white space from strings

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Later
    • Affects Version/s: Adobe Flex SDK 4.0 (Release)
    • Fix Version/s: None
    • Component/s: Data Binding
    • Labels:
      None
    • Environment:
      Affected OS(s): All OS Platforms
      Language Found: English

      Description

      Steps to reproduce:
      1. Compile the following line: <mx:List dataProvider="

      {[' Two Tabs Over', '=( Also Two Tabs']}

      " />

      Actual Results:
      The white space is trimmed out of both elements, even though the string objects are being explicitly declared within { } tags.

      Expected Results:
      The list should have both sentences formatted with tabs

      Workaround (if any):

      Two possible workarounds:
      1. Declare the entire array within MXML - but this has problems since you need to escape < > within mxml primitive string declarations
      <mx:List width="100%" id='as3List' >
      <mx:Array>
      <mx:String> Two Tabs Over</mx:String>
      <mx:String>=) Also Two Tabs</mx:String>
      </mx:Array>
      </mx:List>

      2. Use an actionscript code block (i.e. avoid the MXML compiler entirely! Have the actionscript compiler handle your array instead)
      <mx:List dataProvider='

      {as3List'Array}

      />
      <mx:Script>
      <![CDATA[ var as3ListArray : Array = [' Two Tabs Over', '=) Also Two Tabs']; ]]
      >
      </mx:Script>

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: