2 Replies Latest reply on Sep 29, 2010 6:57 PM by dr_pompeii

    Confusion about s:TextArea and mx:TextArea

    dr_pompeii Level 1

      Hello Guys

       

      I am starting to do some experiments with Flex Builder 4, I am a beginner

       

      I have a huge confusion about the follow

       

      I can create/insert a mx:Form layout component with FB4.

       

      when I drag many TextInput controls all work well, I mean, compile and I can interact with the application through a Web Browser (Firefox)

       

      The problem is when I drag a TextArea then the follow code is generated

       

      <mx:FormItem label="Label" id="Observaciones">
          <s:TextArea id="idObservaciones"

                      enabled="true"

                      width="260"

                      height="100"

                      maxChars="500"/>
      </mx:FormItem>

       

      Notice it is a s:TextArea (BTW I have many *s:TextInput* within the mx:Form and work well)

       

      I can compile without problems, but when I go to Firefox and refresh the page, all stay in blank or white, no error, nothing

       

      But if I change s to mx

       

      <mx:FormItem label="Label" id="Observaciones">
          <m:TextArea id="idObservaciones"
                      enabled="true"
                      width="260"
                      height="100"
                      maxChars="500"/>
      </mx:FormItem>

       

      I can compile without problems, and when I go to Firefox and refresh the page, all work normal again, I can see all the components

      Why?

       

      I have read in Flex documentation both types of components

      s:textArea and mx:TextArea

       

      The mx version said the follow

       

      While you can use the MX controls in your application, Adobe recommends that you use the Spark controls instead

      OK, I have the follow questions

       

      1) Why no work s:TextArea within a mx:Form?

      2) Why Spark Control (s) types are recommended against mx?

      3) I did realize that not all mx has a s version, like mx:DateField, then if Spark Control are better, why all the mx has no an equivalent to s?

       

      Thanks in advanced

        • 1. Re: Confusion about s:TextArea and mx:TextArea
          Flex harUI Adobe Employee

          Don't know why it doesn't work unless you are embedding fonts.  If you hae a

          small test case, post it.

           

          Spark controls should work with MX and vice-versa, but Spark is the next

          generation of components and is optimized to work well with other Spark

          Components and MX components work better with other MX components.

           

          Some Spark versions of the MX components have not shipped yet but all MX

          components are scheduled for replacement eventually.

          • 2. Re: Confusion about s:TextArea and mx:TextArea
            dr_pompeii Level 1

            Hello Flex harUI

             

            Thanks for the reply

             

            Don't know why it doesn't work unless you are embedding fonts.

             

            No I dont use that

             

            The follow experience is very weird.

             

            I created other simple Flex Project and using the same original code, and work fine,

            yes with the s:TextArea!.

             

            Yes, two differents projects with the same source code, one fails and the other work fine

             

            I am totally confused

             

            And even I did the follow, in the failed project I cutted/moved all the code, compile, and pasted again

            and work now, really wondered about this behavior

             

            Some idea?

             

            Spark controls should work with MX and vice-versa, but Spark is the next

            generation of components and is optimized to work well with other Spark

            Components and MX components work better with other MX components.

             

            Ok, I understand that

             

            • Spark and MX are compatible between them
            • Spark work fine among others Spark components
            • MX work fine among others MX components

             

            But what is the advantages of this new generation against MX?, thats my point

             

            Some Spark versions of the MX components have not shipped yet but all MX

            components are scheduled for replacement eventually.

            Thanks for the advice

             

             

            Thanks for your support

             

            -Manuel