4 Replies Latest reply on Aug 2, 2010 12:50 PM by Groovee2010

    fteInMXComponents compiler flag via mxmlc?

    Groovee2010

      This compiler flag can be enabled in the 4.0 IDE and allows legacy MX components to utilize the spark text engine.

       

      However, when building our app via the command line with mxmlc (version 4.1.0.16076), it doesn't seem that this argument is supported.

       

      This is a bit of a roadblock, since legacy components such as mx:Tree fail to utilize a properly embedded true type font.

       

      Any clues?  Thanks!

        • 1. Re: fteInMXComponents compiler flag via mxmlc?
          Groovee2010 Level 1

          and the answer is...

           

          -managers=flash.fonts.AFEFontManager

          • 2. Re: fteInMXComponents compiler flag via mxmlc?
            Groovee2010 Level 1

            Ok, so it turns out that -managers=flash.fonts.AFEFontManager is NOT the answer. It causes your embedded font to be used by the legacy MX components, but if you don't specify fteInMXComponents="true" in conjunction with it (via the checkbox in the IDE compiler properties panel), the spark components will not use the embedded font. Ugh...

             

            So the solution I stumbled upon was to go back to the 4.0 beta solution (before the checkbox was introduced into the IDE) of overriding the text field and text input classes via the style sheet to use the new FTE classes. Example:

             

            mx|ListItemRenderer

            {

            textFieldClass: ClassReference("mx.core.UIFTETextField");

            }

             

             

            This seemed hunky dory and I thought I was good to go.Until I discovered that inline editing of a Tree would fail horribly in the command line-built version where it worked just fine in the IDE-built version. The inline editor, which is a MXFTETextInput within the IDE does not show up at all in the release build. And this failure occurs even with a trivial Tree - no item renderers at all.

             

            I'm hoping that specifying a custom item editor will sidestep the problem, but in the meantime, has anybody else run into this and/or have any insight into what the best solution is. Short of having Flex 4 be updated to a complete and correct spark-based SDK... Someday?

             

            Thanks,

             

            Lance

            • 3. Re: fteInMXComponents compiler flag via mxmlc?
              Flex harUI Adobe Employee

              Should be something like -compiler.defaults-css-files+=MXFTEText.css

              • 4. Re: fteInMXComponents compiler flag via mxmlc?
                Groovee2010 Level 1

                Thanks Alex.

                 

                Including the actual css file from the SDK is much cleaner than cobbling it into my own style sheet. Especially since something within the new file kicked the inline editing into the proper gear.