Skip navigation
con fusion
Currently Being Moderated

Type Coercion failed: cannot convert StyleableStageText to StyleableTextField.

Oct 25, 2011 5:40 PM

#flex-mobile #flex4.5

Hi,

env:

Flash Builder 4.6

as3-signals-v0.9-BETA.swc

robotlegs-framework-v1.5.2.swc

signals-extension-SignalsCommandMap-6241aab.swc

 

Type Coercion failed: cannot convert StyleableStageText to StyleableTextField.

 

//MOBILE REQUIRES SPECIAL TREATMENT TO RENDER HTML, BUT IT WORKS GREAT!

StyleableTextField(clearMessageViewUI.textarea.textDisplay).htmlText = aMessage_str;

 

<s: TextArea id = "textarea" width="100%" height="100" editable="false" selectable="false" />

 


Any suggestions/fixes would be appreciated.

  • Currently Being Moderated
    Community Member
    Oct 25, 2011 5:46 PM

    The AIR runtime has added a feature called StageText, in which text editing is performed by the OS native text controls. This exposes all of the device specific text editing support like autocorrect, text selection and copy/paste.

     

    To support StageText, in Flex 4.6, TextArea and TextInput changed from using a StyleableTextField to a StyleableStageText for their textDisplay skinPart.

     

    You can read more here:

     

    http://opensource.adobe.com/wiki/display/flexsdk/StageText

    |
    Mark as:
  • Currently Being Moderated
    Nov 30, 2011 5:49 PM

    I am having the same problem. Can StageText be dissabled in <s:TextArea .../>? Can I manualy tell a single TextArea to use StyleableTextField instead of StyleableStageText. Don't get me wrong, StyleableStageText is great and I am glad for it but it does prove problematic when upgrading older apps to FLEX 4.6.

    |
    Mark as:
  • Currently Being Moderated
    Adobe Employee
    Nov 30, 2011 6:19 PM

    Should just be:

     

    
        <s:TextArea skinClass=”spark.skins.TextAreaSkin” ...
    

     

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Nov 30, 2011 8:33 PM
    DescriptionResourcePathLocationType
    1172: Definition spark.skins:TextAreaSkin could not be found.ListingDetailsAll.mxml/Up_North_Properties/src/viewsline 316Flex Problem
    1202: Access of undefined property TextAreaSkin in package spark.skins.ListingDetailsAll.mxml/Up_North_Properties/src/viewsline 316Flex Problem

     

    Am I missing something???

     

                <s:TextArea text="Hello there dude" skinClass="spark.skins.TextAreaSkin"/>

     

    That was a bust in my Flash Builder 4.6 and Flex 4.6 Windows 7 machine.

    |
    Mark as:
  • Currently Being Moderated
    Adobe Employee
    Nov 30, 2011 11:59 PM

    Sorry.  Try “spark.skins.mobile.TextAreaSkin”

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Dec 1, 2011 10:26 AM

    YES THAT IS IT!!!

     

    I was able to compile my converted flex 4.5 project with flex 4.6 just fine once I made that change!

     

    Thanks so much! It is a nice trick

     

    To recap. I had a project built using Flex 4.5. When converting it to a Flex 4.6 project there was a problem with the text not flowing as it did, also, screen transitions did not work well at all (text showed stationary during slide transition). I realize now that using a <s:Label../> with some style would have been better but that ship had sailed. I was able to avoid using NativeText / StageText using the folowing trick suggested by "Flex harUI"

     

    <s:TextArea text="Hello there dude" skinClass="spark.skins.TextAreaSkin"/>

     

    "How to not use StyleableStageText in TextArea"

    "Don't want to use StyleableStageText"

    "How to dissable StyleableStageText"

    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points