RichTextEditor.TextArea backgroundColor broken in Flex 4.*

I have a simple application which uses a RichTextEditor with a colored background, like so:
richTextEditor = addChild(new RichTextEditor()) as RichTextEditor;
richTextEditor.textArea.setStyle("backgroundColor", 0xAAAAAA);
richTextEditor.title = "Edit Text:";
richTextEditor.htmlText = formattedText;
This works fine when I compile against Flex 3.5.0, but in Flex 4.0 and 4.5, the background color remains white. I've tried setting it before the text, after the text, before and after it is added to the stage - even every single frame with an EnterFrame handler. Nothing - it just stays white.
Has anyone else encountered this and does anyone have a workaround? I don't really want to switch to a Spark component if I can help it, and I can't downgrade the whole application to 3.5.
Any answers much appreciated - as always.
JcFx

I have an ugly hack fix for this, but I'm still not sure why it's happening. Here's the workaround:
richTextEditor = addChild(new RichTextEditor()) as RichTextEditor;
richTextEditor.setStyle("backgroundColor", 0xAAAAAA);  /* NOT THE TEXT AREA, THE RTE ITSELF */
richTextEditor.title = "Edit Text:";
richTextEditor.htmlText = formattedText;
callLater(hideBackground);
     protected function hideBackground():void
            //Console.Debug("TextFieldEditor hideBackground");
            if (richTextEditor)
                if (richTextEditor.textArea)
                    for (var i:int = 0; i < richTextEditor.textArea.numChildren; i++)
                        var object:DisplayObject = richTextEditor.textArea.getChildAt(i);
                        var className:String =  getQualifiedClassName(object);
                         if(className == "mx.skins.spark::BorderSkin") richTextEditor.textArea.getChildAt(i).visible = false;
- You need to callLater(hideBackground); every time the editor's text or htmlText is updated.
Hope this helps someone in future. It has to be good enough for me at the moment but I'd still like to know why the setStyle call is failing.
JcFx

Similar Messages

  • Obtaining complete text of RichTextEditor/TextArea from Automation object

    Hi,
    If there is "\n" or "\r" in the text of a RichTextEditor/TextArea then how do we obtain these special characters from the automationObject.
    If RichTextEditor/TextArea containts "I\rwas\rhere", then automationObject["text"] (equivalent to RichTextEditor.text/TextArea.text ) is giving "Iwashere" without the special characters.
    I want to verify that resultant input text = text that has been set (inclusive of special characters like ENTER).
    Is there any other API for this?
    Thanks and Regards,
    Pradeep.

    Hi,
    If there is "\n" or "\r" in the text of a RichTextEditor/TextArea then how do we obtain these special characters from the automationObject.
    If RichTextEditor/TextArea containts "I\rwas\rhere", then automationObject["text"] (equivalent to RichTextEditor.text/TextArea.text ) is giving "Iwashere" without the special characters.
    I want to verify that resultant input text = text that has been set (inclusive of special characters like ENTER).
    Is there any other API for this?
    Thanks and Regards,
    Pradeep.

  • Swap RichTextEditor TextArea out with my own

    I'd like to swap out the standard Flex TextArea used by
    RichTextEditor with the DynamicTextArea Greg wrote about in his
    article here:
    http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=13628&prod uctId=2
    I used RemoveChild to remove the existing TextArea, and
    AddChild to add the dynamic resizing one in my already extended
    RichTextEditor class but o fcourse that doesn't completely hook it
    up to my RichTextEditor.
    Is there an "easy" way to do this? I'd like to drop the
    DynamicTextArea into a RichTextEditor and have it assume all the
    functionality the default one does without having to do anything
    different where the RichTextEditor is being used in my app.

    Content and Apple IDs -
    Content is forever tied to the Apple ID that bought it. Apple does not transfer content from one Apple ID to another. Apple does not merge Apple IDs. You will never be able to access your content bought with one Apple ID with a new Apple ID. Your only option is to delete the content and buy it again with the new Apple ID.

  • TextArea String Value in Flex 1.5 - How to read it?

    Hi everyone,
    I have a little inquery about the value that TextArea produce
    in Flex 1.5.
    Once you write any thing that contains multi-lines in
    textArea that's fine. But how to read it correctly?
    I send the value to Java. And it read the value as single
    line.
    How can I improve the reading?
    I know this question should be asked in Java Forum but since
    the source of this problem is Flex then
    I hope if anyone can help me in this.
    Thanks in advance.

    A TextArea will wordwrap by default. If you type in more text
    than will fit
    on a line, then the text will wrap to the next line. The
    TextArea does not
    store this information in its text property. Now if you press
    the "Enter"
    key in the TextArea, you should get a newline character in
    the text
    property.
    Jason Szeto
    "Digital Hand" <[email protected]> wrote in
    message
    news:e2pnv5$reo$[email protected]..
    > Hi everyone,
    >
    > I have a little inquery about the value that TextArea
    produce in Flex 1.5.
    > Once you write any thing that contains multi-lines in
    textArea that's
    > fine.
    > But how to read it correctly?
    > I send the value to Java. And it read the value as
    single line.
    >
    > How can I improve the reading?
    >
    > I know this question should be asked in Java Forum but
    since the source of
    > this problem is Flex then
    > I hope if anyone can help me in this.
    >
    > Thanks in advance.
    >

  • Performance Profile broken in Flex 4?

    I'm trying to profile my application, but I can't get the Performance Profile view to show anything.  When profiling began I did tell it to profile performance, are there any other steps to make it work, or is it broken?

    Hi,
    If you have selected only performance profiling you need to capture performance profile data by clicking on the capture performance profile data button.
    If you have reset the performance data before capturing the performance profile data then you may not see performance of any of the methods.
    Thanks,
    Kishan

  • Charts in Flex 3 compatibility mode are hosed

    I spent an 11 hour day struggling to get a LineChart working in Flex 3 compatibility mode that worked fine otherwise. I encountered a multitude of problems, spent hours tracing through Flex code, and finally have something almost working except for minor details like the horizontal axis insists on displaying on the top only (and the vertical on the right) even if I use the axis renderer placement tags to specify otherwise (and with any other values except "bottom" and "left" the data does not draw properly!). To give you a feeling for what I learned, a major breakthrough was setting gutters explicitly (the data points were calculated as NaN otherwise).
    If someone could suggest what might need setting to get the axes to display where I want them to I will be very grateful.
    To summarize -- LineCharts appear to be badly broken in Flex 3 compatibility mode.
    If an Adobe developer would like to verify, here is my source, including an example of the data I'm using. I posted earlier today wondering what the situation is and give some more details there.
    Thanks, Peter ([email protected])
    <?xml version="1.0"?>
    <!-- charts/BasicLine.mxml -->
    <mx:Application
        xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:bwc="*"
        creationComplete="initialization()"
        width="1200" height="800" layout="absolute" >       
        <mx:Label id="titleLabel" x="30" y="10" text="Progress Chart for " fontSize="16" />
        <!--mx:Label id="measureLabel" x="688" y="25" text="Measure:" fontSize="12" width="67"/-->
        <mx:ComboBox id="measureCombo" x="300" y="14" width="300" dataProvider="{patientMeasureNames}"
                     editable="false" change="loadPatientData()" />   
        <mx:SolidColorStroke id="axisStroke"
                             color="#000000"
                             weight="2"
                             alpha="1"
                             caps="square" />
        <mx:SolidColorStroke id="tickStroke"
                             color="#000000"
                             weight="1"
                             alpha="1" />
        <mx:SolidColorStroke id="minorTickStroke"
                             color="#000000"
                             weight="1"
                             alpha="1" />
        <mx:SolidColorStroke id="dataStroke"
                             color="0x11538C"
                             weight="3"
                             alpha="1" />
        <mx:Canvas id="chartCanvas" x="30" y="50" width="600" height="500" borderStyle="solid" >
            <mx:LineChart id="progressChart" x="10" y="10" width="550" height="450"
                          dataProvider="{patientData}"
                          showDataTips="true"     
                          horizontalAxisStyleNames="{styleNames}" verticalAxisStyleNames="{styleNames}"
                          gutterBottom="10" gutterLeft="10" gutterRight="10" gutterTop="10" gridLinesStyleName=""
                          >
                <mx:annotationElements>
                    <mx:CartesianDataCanvas id="annotationCanvas" includeInRanges="true"  width="800" height="400"/>
                </mx:annotationElements>
                <mx:horizontalAxis>
                    <mx:DateTimeAxis id="hAxis" parseFunction="makeDateFromString"
                                     alignLabelsToUnits="true" displayLocalTime="true"
                                     title="" labelFunction="formatDateLabel" maximum="{maxDate}"
                                      /> <!--  -->
                </mx:horizontalAxis>
                <mx:verticalAxis>
                    <mx:LinearAxis id="vAxis" interval="1" maximum="{this.maxValue}" title="" /> <!--  -->
                </mx:verticalAxis>
                <mx:series>
                    <bwc:BwcLineSeries xField="date" yField="value" displayName="(measure)" stroke="{dataStroke}"
                                   itemRenderer="mx.charts.renderers.CircleItemRenderer"
                                   lineSegmentRenderer="mx.charts.renderers.LineRenderer"
                                    width="700" height="350" lineStroke="{dataStroke}" radius="4"
                                   >
                    </bwc:BwcLineSeries>               
                </mx:series>
                <mx:seriesFilters>
                    <mx:Array/>
                </mx:seriesFilters>
                <mx:horizontalAxisRenderers>
                    <mx:AxisRenderer axis="{hAxis}"
                                     axisStroke="{axisStroke}" tickStroke="{tickStroke}" minorTickStroke="{minorTickStroke}"
                                     showLine="true" showLabels="true" labelRenderer="mx.charts.chartClasses.ChartLabel"
                                     placement="bottom" tickPlacement="cross" tickLength="5" fontSize="12"
                                     />
                </mx:horizontalAxisRenderers>           
                <mx:verticalAxisRenderers>
                    <mx:AxisRenderer axis="{vAxis}"
                                     axisStroke="{axisStroke}" tickStroke="{tickStroke}" minorTickStroke="{minorTickStroke}"
                                     showLine="true" showLabels="true" labelRenderer="mx.charts.chartClasses.ChartLabel"
                                     placement="left" tickPlacement="cross" tickLength="5" fontSize="12"
                                     />
                </mx:verticalAxisRenderers>
            </mx:LineChart>
            <!--mx:Legend id="chartLegend"
                       x="20" y="{chartCanvas.height - chartLegend.height - 20}"
                       dataProvider="{progressChart}" /-->
        </mx:Canvas>
        <mx:Script>
            <![CDATA[
                import com.bewellcommunication.pvg.model.BackendService;
                import com.bewellcommunication.pvg.model.Utilities;
                import flash.events.TimerEvent;
                import mx.charts.chartClasses.IAxis;
                import mx.charts.series.items.LineSeriesItem;
                import mx.collections.ArrayCollection;
                import mx.collections.XMLListCollection;
                import mx.controls.RadioButton;
                import mx.controls.RadioButtonGroup;
                import mx.rpc.events.ResultEvent;
                [Bindable]
                private var patientMeasureNames:ArrayCollection;
                private var patientMeasureIds:Array;
                private var dataVideoIds:Array;
                private var videoButtons:Array;
                [Bindable]
                private var patientData:XMLListCollection;
                [Bindable]
                private var maxDate:Date;
                [Bindable]
                private var maxValue:Number;
                [Bindable]
                private var styleNames:Array = new Array("axisStroke");
                private function initialization():void
                    var service:BackendService = new BackendService();
                    var xml:String = "<LoadPatientMeasures>"
                        + "\n<clientId>" + 2 + "</clientId>"
                        + "\n</LoadPatientMeasures>";
                    service.request(xml, loadPatientMeasuresFinish);
                public function loadPatientMeasuresFinish(re:ResultEvent):void
                    var xmlResult:XML = XML(re.result.valueOf().toString());
                    var error:String = xmlResult.error;
                    if (error != null && error != "")                   
                        trace(xmlResult.error + "Problem loading patient measures");        // PENDING: bwcAlert
                    else
                        this.patientMeasureNames = new ArrayCollection();
                        this.patientMeasureNames.addItem("(Select measure)");
                        this.patientMeasureIds = new Array();
                        this.patientMeasureIds.push(0);
                        var xmlMeasures:XMLList = xmlResult.measures.children();
                        for each (var xmlMeasure:Object in xmlMeasures)
                            this.patientMeasureIds.push(Number(xmlMeasure.measureId));
                            var name:String = xmlMeasure.measureName;                        // PENDING: utils.makeSafe()
                            this.patientMeasureNames.addItem(name);       
                public function loadPatientData():void
                    var measureIndex:int = this.measureCombo.selectedIndex;
                    if (measureIndex < 1)
                        return;
                    var service:BackendService = new BackendService();
                    var xml:String = "<LoadPatientData>"
                        + "\n<clientId>" + 2 + "</clientId>"
                        + "\n<measureId>" + this.patientMeasureIds[measureIndex] + "</measureId>"
                        + "\n</LoadPatientData>";
                    service.request(xml, loadPatientDataFinish);               
                public function loadPatientDataFinish(re:ResultEvent):void
                    var xmlResult:XML = XML(re.result.valueOf().toString());
                    var error:String = xmlResult.error;
                    if (error != null && error != "")                   
                        trace(xmlResult.error + "Problem loading patient data");        // PENDING: bwcAlert
                    else
                        // re-initialize
                        this.annotationCanvas.removeAllChildren();                   
                        // set data for graphing
                        this.patientData = new XMLListCollection(xmlResult.results.result);
                        this.dataVideoIds = new Array();
                        // calculate mins and maximums for axis spacing
                        var xmlResults:XMLList = xmlResult.results.children();
                        var minDate:Number = Number.MAX_VALUE;
                        var maxDate:Number = Number.MIN_VALUE;
                        var minVal:Number = Number.MAX_VALUE;
                        var maxVal:Number = Number.MIN_VALUE;
                        for each (var result:Object in xmlResults)
                            var date:Number = Number(result.date);
                            var val:Number = Number(result.value);
                            if (!isNaN(val))
                                if (date < minDate)
                                    minDate = date;
                                if (date > maxDate)
                                    maxDate = date;
                                if (val < minVal)
                                    minVal = val;
                                if (val > maxVal)
                                    maxVal = val;
                            // also store the video id
                            var videoId:Number = Number(result.videoId);
                            this.dataVideoIds.push(videoId);
                        // set scale max for each axis
                        this.maxDate = new Date(maxDate + ((maxDate - minDate) * 0.1));
                        this.maxValue = maxVal * 1.1;
                        // draw links to videos
                        var utils:Utilities = new Utilities();
                        utils.relinquishThenFinish(drawLinksToVideos, 500);
                private function drawLinksToVideos(e:TimerEvent):void
                    var rect:Rectangle = new Rectangle(0, 0, 99999, 99999);        // get all items
                    var items:Array = this.progressChart.getItemsInRegion(rect);
                    var i:int;
                    var rbg:RadioButtonGroup = new RadioButtonGroup(this.annotationCanvas);
                    this.videoButtons = new Array();
                    for (i = 0; i < items.length; i++)
                        var liveButton:RadioButton = null;
                        if (this.dataVideoIds[i] > 0)
                            var item:LineSeriesItem = items[i];
                            var radio:RadioButton = new RadioButton();
                            radio.group = rbg;
                            liveButton = radio;
                            radio.addEventListener(Event.CHANGE, loadAndPlayVideo);
                            this.annotationCanvas.addDataChild(radio, item.xValue, item.yValue);
                        this.videoButtons.push(liveButton);    // one for each item
                private function loadAndPlayVideo(e:Event):void
                    var utils:Utilities = new Utilities();
                    utils.relinquishThenFinish(finishLoadAndPlayVideo);
                private function finishLoadAndPlayVideo(e:TimerEvent):void
                    // identify video to play
                    var i:int;
                    var target:int = -1;
                    for (i=0; target == -1 && i < this.videoButtons.length; i++)
                        var radio:RadioButton = this.videoButtons[i] as RadioButton;
                        if (radio != null && radio.selected)
                            target = i;
                    // play video
                    if (target > -1)
                        trace("play video: index=" + target + " id=" + this.dataVideoIds[target]);
                private function makeDateFromString(dateStr:String):Date
                    var dateNum:Number = Number(dateStr);
                    var date:Date = new Date(dateNum);
                    trace("date=" + date.toLocaleString());
                    return date;
                private function formatDateLabel(cur:Date, prev:Date, axis:IAxis):String
                    var label:String = cur.month + "/" + cur.date + " " + cur.hours + ":" + cur.minutes;
                    return label;
            ]]>
        </mx:Script>
    </mx:Application>
    package
        import mx.charts.series.LineSeries;
        public class BwcLineSeries extends LineSeries
            public function BwcLineSeries()
                super();
            override protected function updateDisplayList(unscaledWidth:Number,
                                                          unscaledHeight:Number):void
                var useWidth:Number = unscaledWidth;
                var useHeight:Number = unscaledHeight;
                /*if (isNaN(useWidth))
                    useWidth = 745.5;
                    useHeight = 365;
                super.updateDisplayList(useWidth, useHeight);
    <data>
      <measure/>
      <results>
        <result>
          <date>1276613823585</date>
          <value>180.0</value>
          <videoId>0</videoId>
        </result>
        <result>
          <date>1276613923383</date>
          <value>170.0</value>
          <videoId>0</videoId>
        </result>
        <result>
          <date>1276614556024</date>
          <value>210.0</value>
          <videoId>0</videoId>
        </result>
        <result>
          <date>1276628450502</date>
          <value>150.0</value>
          <videoId>104</videoId>
        </result>
        <result>
          <date>1276628667114</date>
          <value>180.0</value>
          <videoId>106</videoId>
        </result>
      </results>
    </data>

    @Jason Villmer,
    I believe the issue you're describing is http://bugs.adobe.com/jira/browse/SDK-26940.
    There is a workaround listed in the bug report which should work (based on my testing), or you could probably set the direction and layoutDirection styles globally using a Style block.
    Peter

  • TextArea Clipping in Air 3.9 on iOS7

    I hope someone can help here as this is driving me crazy
    I am using the TextArea mobile component for Flex (yes, I know that it is Apache now, but someone on here hopefully can help!) and using it in the most vanilla way, but whatever I do I get clipped text at the start (see attached image)
      <s:TextArea id="text" width="100%" height="260" />
    I have tried standard system fonts, declaring the skins specifically such as
      <s:TextArea id="text" width="100%" height="260" skinClass="spark.skins.mobile.StageTextAreaSkin"  />
      <s:TextArea id="text" width="100%" height="260" skinClass="spark.skins.mobile.TextAreaSkin"  />
    But it all has the same effect - the far left of the text is clipped. Now, I am sure it is something in the skin but I cannot track it down, and it does not happen in the TextInput skin, but TextArea is far more complex due to scrolling etc. I have actually also tried using the StageText object directly in ActionScript but it has the same issue, so I have started to think that it is perhaps something in Air. I am using the latest Air 3.9 beta and Flex 4.10 on iOS7, although it is on iOS 6 too.
    Can anyone shed some light on this? It is driving me nuts!
    Thanks

    I have used the actionscript code without using any flex components.
    You can try the following code snippet:
        import flash.display.Sprite;
        import flash.geom.Rectangle;
        import flash.text.StageText;
        import flash.text.StageTextInitOptions;
        import flash.text.TextFormatAlign;
        public class StageText_align extends Sprite
            private var nativeText:StageText;
            public function StageText_align() {
                nativeText = new StageText(new StageTextInitOptions(true));
                nativeText.stage = this.stage;
                nativeText.viewPort = new Rectangle(30, 37, 200, 106);
                nativeText.textAlign = TextFormatAlign.RIGHT;
                nativeText.text = "Stage text right aligned";
    -Pranali

  • b and i tags not working in StyleableTextField for mobile development

    I'm trying to dynamically produce TextArea instances in a Flex mobile app that implement html formatting.  I've made a lot of progress, but simple <b> and <i> tags are not being rendered correctly. 
    My current hypothesis is that I need to embed the italic and bold fonts.  I am currently not embedding fonts for these particular TextArea instances at all -- they are rendering using the system font.  In my previous experience, this eliminates problems with rendering <b> and <i> text.  However, when deploying on mobile platforms, I don't know for sure if there is a bold or italic system font natively available. 
    If I need to embed the bold and italic fonts for the tags to process correctly, does anyone know which font(s) I should embed and how I should name them so that the html will be able to find them and render correctly?  I am applying a CSS to these TextArea instances in the full app, so I can do any font embedding there if necessary.  I am planning to compile this app for both iOS and Android, in case that makes a difference. 
    Below is a simplified example of the code I'm using.  The TextArea that is generated is formatted honoring the <br /> tags, but ignoring the <b> and <i> tags. 
    Thanks in advance for any help. 
    import mx.events.FlexEvent;
    import spark.components.TextArea;
    import spark.components.supportClasses.StyleableTextField;
    import spark.skins.mobile.TextAreaSkin;
    protected function application1_creationCompleteHandler(event:FlexEvent):void
              var textArea0:TextArea = new TextArea();
              textArea0.setStyle("skinClass", TextAreaSkin);
              addElement(textArea0);
              var styleableTextField0:StyleableTextField = StyleableTextField(textArea0.textDisplay);
              styleableTextField0.multiline = true;
              styleableTextField0.htmlText = "<b>bold</b><br /><i>italic</i><br />normal";

    Huh!  I tried tracing the htmlText property after formatting, and the bold and italic tags are not there anymore.  Unexpected, but consistent with the results.  Thanks for suggesting that test.  Here is the line where I assign the htmlText property:
    styleableTextField0.htmlText = "normal<br/><i>italic</i><br/><b>bold</b><br/><a href='http://www.google.com/'>link</a>";
    Here is the section where I create the StyleSheet and assign it to the StyleableTextField:
    var styles:String =
      "@font-face{ fontFamily: Arial; src: url('assets/fonts/Arial.ttf'); embedAsCFF: false;}" +
      "@font-face{ fontFamily: Arial; src: url('assets/fonts/Arial Italic.ttf'); fontStyle: italic; embedAsCFF: false;}" +
      "@font-face{ fontFamily: Arial; src: url('assets/fonts/Arial Bold.ttf'); fontWeight: bold; embedAsCFF: false;}" +
      "a { color: #FFE043; textDecoration: underline; } " +
      "a:active{ color: #ffffff;}" +
      "b{fontWeight:bold; fontFamily: Arial;} " +
      "i{fontStyle:italic; fontFamily: Arial;}";
    var myStyleSheet:StyleSheet = new StyleSheet();
    myStyleSheet.parseCSS(styles);
    styleableTextField0.styleSheet = myStyleSheet;
    And here is the trace statement
    trace( styleableTextField0.htmlText); // <TEXTFORMAT RIGHTMARGIN="21" INDENT="10" LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="16" COLOR="#FFFFFF" LETTERSPACING="0" KERNING="0">normal</FONT></P></TEXTFORMAT><TEXTFORMAT RIGHTMARGIN="21" INDENT="10" LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="16" COLOR="#FFFFFF" LETTERSPACING="0" KERNING="0">italic</FONT></P></TEXTFORMAT><TEXTFORMAT RIGHTMARGIN="21" INDENT="10" LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="16" COLOR="#FFFFFF" LETTERSPACING="0" KERNING="0">bold</FONT></P></TEXTFORMAT><TEXTFORMAT RIGHTMARGIN="21" INDENT="10" LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="16" COLOR="#FFFFFF" LETTERSPACING="0" KERNING="0"><A HREF="http://www.google.com/" TARGET="">link</A></FONT></P></TEXTFORMAT>
    Lots of code modification going on behind the scenes, it would seem.  Any idea as to why the bold and italic tags are being stripped out when the formatting process happens?  Any idea of what steps I could take next?  Thanks for all your help so far! 
    BTW, here's a screen capture of what the text looks like at this point:

  • [svn:fx-trunk] 5170: Round 2 of bug fixes for the Spark skins for Halo components.

    Revision: 5170
    Author: [email protected]
    Date: 2009-03-04 17:50:32 -0800 (Wed, 04 Mar 2009)
    Log Message:
    Round 2 of bug fixes for the Spark skins for Halo components. Thanks to Alex for help with the data grid issues.
    Bugs fixed:
    SDK-19655 - Setting rowCount property on DataGrid causes extra blank row to be displayed
    SDK-19652 - Items in a DataGrid do not line up after scrolling.
    SDK-19605 - disabled Halo ColorPicker with Gumbo skin draws too dark
    SDK-19596 - When you have a single button on an Alert, the left edge looks flatter than the right
    SDK-19585 - Menus compiled with the halo theme in Flex 4 have a different backgroundColor than in Flex 3
    SDK-19665 - Halo List with Gumbo skin doesnt draw the alternating item color all the way to the right edge of the control if VScrollBar is present
    SDK-19651 - odd header rendering issue on Halo DataGrid with Gumbo skin
    QA Notes: The alert layout code was positioning the buttons/text on sub-pixel boundaries if the width or height of the alert was an odd number of pixels. We always snap to pixel boundaries now, but this may cause bitmap compare issues with Alert.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-19655
    http://bugs.adobe.com/jira/browse/SDK-19652
    http://bugs.adobe.com/jira/browse/SDK-19605
    http://bugs.adobe.com/jira/browse/SDK-19596
    http://bugs.adobe.com/jira/browse/SDK-19585
    http://bugs.adobe.com/jira/browse/SDK-19665
    http://bugs.adobe.com/jira/browse/SDK-19651
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/alertClasses/AlertForm.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as
    flex/sdk/trunk/frameworks/projects/halo/defaults.css
    flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ColorPickerSkin.mxml

  • Move a scroller with code

    I have a tabBar that i have put in a scroller, now i want to put two buttons
    outside the scroller so that if the tabBar becomes too big then the user can press the buttons to
    scroll the tabBar across. i don't know how to move the position of the scroller though
    so on the click of the button i need to to see a property of the scroller or its scroll bars ?
            <s:HGroup>
            <s:Scroller  id="sd" width="200" horizontalScrollPolicy="off"  >
                <s:HGroup>
                    <s:TabBar id="tabs" left="8" y="2" dataProvider="{vs}"/>
                </s:HGroup>
            </s:Scroller>
            <s:Button label="< />
            <s:Button label=">"/>
            </s:HGroup>

    just found it , thanks
    <s:Button label="<" click="sd.horizontalScrollBar.value += 10"/>
    found at
    http://blog.flexexamples.com/2010/02/18/programmatically-scrolling-the-spark-textarea-cont rol-in-flex-4/
    That guys a legend

  • Update of XML syndication map when XSD is changed

    All,
    So we recently upgraded to MDM 7.1 SP 06 and found a new feature which we were waiting for quiet some time. Thought i'll share with the community as well.
    Update of XML syndication map when XSD is changed in Console
    In earlier SP's of MDM, if we had to update an XML syndication map, we had to upload the new XSD in Console, go to syndicator and basically re-create the whole map. there was no way for syndicator to preserve the old mapping.
    Well with this new feature, the old mapping is preserved, we only need to re-map the new fields.
    The process is as below:
    1. Upload the new XSD in Console.
    2. Go to syndicator and open the syndication map which you want to update(File->Open).
    3. Click File -> Update XML Schema. (this is the new option)
    4. It will give a pop-up, select the new schema you have uploaded in console and hit OK.
    5. You will get a prompt saying that syndication map is being changed, hit OK.
    6. Now you will see the new XSD in syndicator, the older fields are still mapped, you only need to map the new fields.
    It a nice feature which will definitely save lot of time. Thanks SAP
    Regards
    Aamir

    If this post answered your question or helped, please mark it as such.
    This works.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.events.DataGridEvent;
          import mx.collections.ArrayCollection;
          [Bindable] private var ac:ArrayCollection = new ArrayCollection([
            {bgColor: "0xFF0000", num: 100, name: "Test1"},
            {bgColor: "0xFF0000", num: 200, name: "Test2"},
            {bgColor: "0xFF0000", num: 300, name: "Test3"},
          private function changeBK(evt:DataGridEvent):void{
            var row:uint = evt.rowIndex;
            var data:Object = ac.getItemAt(row);
            data.bgColor = "0x00FF00";
        ]]>
      </mx:Script>
      <mx:DataGrid id="dg" dataProvider="{ac}" itemEditEnd="changeBK(event);"
        editable="true">
        <mx:columns>
          <mx:DataGridColumn dataField="num">
            <mx:itemRenderer>
              <mx:Component>
                <mx:TextArea backgroundColor="{data.bgColor}" text="{data.num}"/>
              </mx:Component>
            </mx:itemRenderer>
          </mx:DataGridColumn>
          <mx:DataGridColumn dataField="name"/>
        </mx:columns>   
      </mx:DataGrid>
    </mx:Application>

  • TextAlign justify and linkElement problem

    Hi,
    I have a paragraph with text and a link.
    The link contains a span (backgroundColor = blue, fontWeight=bold) and all properties of each link format (format, linkNormalFormat, linkActiveFormat, linkHoverFormat) inherit from the paragraph format.
    I added event listener on the link to manage tooltip.
    It works perfectly if paragraph.textAlign = "left" or "right" as shown in attached pictures.
    But if I change my code to paragrah.textAlign="justify" (without changing anything else), I obtain a bad result (as shown in attached picture) :
    - the backgroundColor on the span doesn't work anymore (but the bold is still working)
    - my tooltip event listener doesn't work anymore.
    I don't understand why, thanks for your help !
    Olivier
    PS : I used the build 13875.

    Hi,
    Here is the code :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
        <mx:Script>
            <![CDATA[
                import flashx.textLayout.events.FlowElementMouseEvent;
                import flashx.textLayout.elements.LinkElement;
                import flashx.textLayout.formats.TextAlign;
                import flashx.textLayout.elements.SpanElement;
                import flashx.textLayout.elements.ParagraphElement;
                import flashx.textLayout.container.ContainerController;
                import flashx.textLayout.elements.TextFlow;
                import mx.core.UIComponent;
                private var textFlow:TextFlow;
                private function init():void
                    var container:UIComponent = new UIComponent();
                    container.width = textArea.width - 5;
                    container.height = textArea.height - 5;
                    textArea.addChild(container);
                    textFlow = new TextFlow();
                    var controller:ContainerController = new ContainerController(container);//, width, height);
                    textFlow.flowComposer.addController(controller);
                    var p:ParagraphElement = new ParagraphElement();
                    p.textAlign = TextAlign.JUSTIFY;
                    textFlow.paragraphStartIndent = 50;
                    textFlow.paragraphEndIndent = 50;
                    textFlow.addChild(p);
                    var span1:SpanElement = new SpanElement();
                    span1.text = "Legal values are numbers from 1 to 720 Legal values are numbers from 1 to 720 ";
                    p.addChild(span1);
                    var link:LinkElement = new LinkElement();
                    var linkSpan:SpanElement = new SpanElement();
                    linkSpan.text = "a link";
                    link.addChild(linkSpan);
                    p.addChild(link);
                    link.addEventListener(FlowElementMouseEvent.ROLL_OVER, function (e:Event):void
                        onoverbtn.visible = true;
                    link.addEventListener(FlowElementMouseEvent.ROLL_OUT, function (e:Event):void
                        onoverbtn.visible = false;
                    var span2:SpanElement = new SpanElement();
                    span2.text = " Legal values are numbers from 1 to 720 Legal values are numbers from 1 to 720 ....";
                    p.addChild(span2);
                    textFlow.flowComposer.getControllerAt(0).setCompositionSize(300,10000);
                    textFlow.flowComposer.updateAllControllers();
            ]]>
        </mx:Script>
        <mx:Button id="onoverbtn" label="on over !!!!" visible="false" fontSize="50"/>
        <mx:Canvas id="textArea" backgroundColor="#ffffff" verticalCenter="0" horizontalCenter="0" height="500" width="500"/>
    </mx:Application>
    Comment and uncomment row 31 (p.textAlign = TextAlign.JUSTIFY;), if commented, everything is ok, else, the link doesn't work anymore
    I have flashplayer 10,0,32,18 installed.
    Thanks a lot.
    Olivier

  • Datagrid Image Renderer Broken in CS SDK but not Flex project

    Within a Photoshop Extension, I have a DataGrid which has an inline custom image renderer whose dataprovider is an ArrayCollection called "photos"  representing a list of photos and some metadata properties.  One of the properties "fileName" is concatenated with a path to a thumbnail image such as source="{'LR_AUTO/imported/thumbs/' + data.fileName}".
    The dataprovider is bound to a LCDS DataService. When the extension is first launched, the dataservice initializes the dataprovider with the existing values for the "photos" arraycollection.  The thumbnail images are correctly shown.
    However, when the DataService receives a new row and updates the photos dataprovider, the datagrid's new row shows a broken image for the thumbnail even though the path is correct.  I have dumped the photos dataprovider and verified that all information is correct.  When I close Photoshop and relaunch it from Flash Builder, once again LCDS initializes the photos ArrayCollection and THEN the thumbnail that previously showed as broken show up correctly.
    I have a ColdFusion Directory Watcher Gateway that watches a directory where Lightroom auto-imports images from a tethered capture session.  When the camera sends Lightroom a new image, the new image is processed by Lightroom and moved to a target directory, and since ColdFusion's Directory Watcher is watching that targeted directory, ColdFusion will create a thumbnail image in a subfolder and notifiy LCDS that of the new image and related metadata.
    *** This is the interesting part *** When Lightroom places new images in the target directory, this is propogated to the Photoshop Extension's datagrid, and the new row shows up as described earlier, showing a broken image for the thumbnail.  BUT, instead of Lightroom, if I manually copy images to the folder where ColdFusion is watching, then exact same code path is exectuted and in the Photoshop Datagrid the new row appears and THE THUMBNAIL IMAGE shows up correctly.
    The difference seems to be only in how the images are put in the original target location.  The problem is when Lightroom puts them there, but it works when I put them there as a user.
    *** More Interesting Info *** I have the Flex code for the Photoshop Extension duplicated in a standalone, non-CSSDK project using Flex 3.4 which I launch in a browser.  I have mirrored the code in the Photoshop extension, but in this manner, the problem does not exist.  With plain Flex 3.4 in a browser, whenever LCDS notifies the datagrid of a new photo record, the datagrid's new row ALWAYS shows the thumbnail correctly.
    A primary difference in how the thumbnail image is rendered is that in a browser, the Flex 3.4 project accesses the image assets over the network, however, in the Photoshop Extension, the image asset WITH THE SAME RELATIVE PATH is accessed over the local file system.
    source="{'LR_AUTO/imported/thumbs/' + data.fileName}"
    So in the case of the browser, this path is a relative URL and the image is retrieved over HTTP, however, in the PS Extension, the same path represents a file system path relative to the project folder.
    Unfortunately, because the Flash Player (including APE) cannot access BOTH the network and the local filesystem, so I cannot change the Extension to use network access.
    ** The important part to remember is that when I stop the Flash Builder debug session and close Photoshop, then relaunch the debug with Photoshop, then all the images show up correctly in the Extension.
    Your advice is appreciated.
    Thank you!
    Steve
    ====================================================
    Environment
    ====================================================
    Photoshop CS5 Extended 12.01 x32
    Flash Builder 4
    CS SDK 1.02
    Extension Builder SDK 3.4
    MacBook Pro / OS X 10.5 / Intel Core 2 Duo 2.66 GHz / Procs: 1 / Cores: 2 / Memory: 8 GB
    App configured for Photoshop CS5 and Photoshop CS5 Extended
    ====================================================
    NewsAgencyPhotoshop.mxml
    ====================================================
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="com.stevenerat.news.*"
                    horizontalScrollPolicy="off" verticalScrollPolicy="off" verticalGap="0"
                    layout="vertical" horizontalAlign="left"  backgroundColor="#353535"
                    historyManagementEnabled="false"
                    creationComplete="init();">
        <mx:Script>
                public function handlePhotoClick(data:Object):void {
                    this.PreviewImageWindow = PreviewImage(PopUpManager.createPopUp(this,PreviewImage,true));
                    var filePath:String = data.dirPath + data.fileName;
                    PreviewImageWindow.addEventListener("imageOpenEvent",imageOpenListener);
                    PreviewImageWindow.addEventListener("imageCloseEvent",imageCloseListener);
                    PreviewImageWindow.addEventListener("imageSavedEvent",imageSaveListener);
                    PreviewImageWindow.setFileName(data.fileName);
                    PreviewImageWindow.setFilePath(filePath);
                    PreviewImageWindow.y = 0;
                    PreviewImageWindow.x = 0;
            ]]>
        </mx:Script>
        <mx:ArrayCollection id="photos"/>
        <NewsPhoto/>
        <mx:DataService id="ds" destination="NewsAgencyPhotos" autoSyncEnabled="true" autoCommit="true" conflict="conflictHandler(event)"/>
        <mx:Label text="News Agency Photos" fontSize="20" paddingBottom="30"/>
        <mx:Label text="Available Images" fontSize="15"/>
        <mx:DataGrid id="photoIPTC" dataProvider="{photos}" editable="true" width="220" rowCount="5" rowHeight="75" wordWrap="true">
            <mx:columns>
                <mx:DataGridColumn headerText="id" dataField="fileName" width="40" editable="false" sortDescending="true"/>
                <mx:DataGridColumn dataField="psLock" width="65" headerText="Status" editable="false" editorDataField="value">
                    <mx:itemEditor>
                        <mx:Component>
                            <mx:ComboBox editable="false">
                                <mx:dataProvider>
                                    <mx:String>New</mx:String>
                                    <mx:String>Open</mx:String>
                                    <mx:String>Edited</mx:String>
                                </mx:dataProvider>
                            </mx:ComboBox>
                        </mx:Component>
                    </mx:itemEditor>
                </mx:DataGridColumn>
                <mx:DataGridColumn headerText="Photo" dataField="fileName" width="80" editable="false">
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:HBox horizontalAlign="center" horizontalScrollPolicy="off" verticalScrollPolicy="off">
                                <mx:Image click="outerDocument.handlePhotoClick(data);" source="{'LR_AUTO/imported/thumbs/' + data.fileName}" width="75" height="75"/>
                            </mx:HBox>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>
    ====================================================
    A DUMP OF THE DATAPROVIDER
    in this case, one array item existed when launched, then a second was added
    while running.  The first has its thumbnail show, the second item has broken image
    ====================================================
    ------------------DUMP----------------------------
    (mx.collections::ArrayCollection)#0
      filterFunction = (null)
      length = 2
      list = (mx.data::DataList)#1
        fillParameters = (Array)#2
        length = 2
        localItems = (Array)#3
          [0] (com.stevenerat.news::NewsPhoto)#4
            aperture = "F10"
            cameraLens = "EF24-70mm f/2.8L USM"
            cameraModel = "Canon EOS 7D"
            city = ""
            copyrightNotice = "¬© Steven Erat 2011"
            country = ""
            creator = "Steven Erat"
            description = ""
            dirPath = "/Users/stevenerat/LR_AUTO/imported/"
            fileName = "ERAT_STEVEN_20110122_162.jpg"
            focalLen = "42.0 mm"
            headline = ""
            id = 1
            iso = "100"
            keywords = "Alt, Dramatic, Fashion, Girl, Glamorous, Glamour, Inked, Model, Portrait, SOPHA"
            psLock = "New"
            shutterSpeed = "1/128 sec"
            state = ""
          [1] (com.stevenerat.news::NewsPhoto)#5
            aperture = "F10"
            cameraLens = "EF24-70mm f/2.8L USM"
            cameraModel = "Canon EOS 7D"
            city = ""
            copyrightNotice = "¬© Steven Erat 2011"
            country = ""
            creator = "Steven Erat"
            description = ""
            dirPath = "/Users/stevenerat/LR_AUTO/imported/"
            fileName = "ERAT_STEVEN_20110122_163.jpg"
            focalLen = "42.0 mm"
            headline = ""
            id = 2
            iso = "100"
            keywords = "Alt, Dramatic, Fashion, Girl, Glamorous, Glamour, Inked, Model, Portrait, SOPHA"
            psLock = "New"
            shutterSpeed = "1/128 sec"
            state = ""
        uid = "8BAC025E-60D1-11F1-3654-44BDB0D218CE"
        view = (mx.collections::ArrayCollection)#6
          filterFunction = (null)
          length = 2
          list = (mx.data::DataList)#1
          sort = (null)
          source = (null)
      sort = (null)
      source = (null)
    ------------------END_DUMP------------------------

    I expected that if my extension uses the local filesystem AND the network that I would get a Security Sandbox Exception as I recently described in this thread:
    http://forums.adobe.com/thread/791918?tstart=0
    However, I just tried changing my datagrid image renderer to access the thumbnail via HTTP and the thumbnail issue after Lightroom export does not happen.
                <mx:DataGridColumn headerText="Photo" dataField="fileName" width="80" editable="false">
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:HBox horizontalAlign="center" horizontalScrollPolicy="off" verticalScrollPolicy="off">
                                <mx:Image click="outerDocument.handlePhotoClick(data);" source="{'http://localhost:8500/LR_AUTO/imported/thumbs/' + data.fileName}" width="75" height="75"/>
                            </mx:HBox>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>
    Furthermore, I can also open the image via the Photoshop DOM, and it does open correctly.  It seems that I do have a solution now, although I'm not certain as to why I'm not getting a Security Sandbox Exception as I described in the other post.
    Thanks for reading.

  • [svn:fx-trunk] 10866: Fix broken links in ASDoc comments for TLFTextInput. as and TextArea.as, and add OverrideBase.as to ASDoc output

    Revision: 10866
    Author:   [email protected]
    Date:     2009-10-05 08:56:44 -0700 (Mon, 05 Oct 2009)
    Log Message:
    Fix broken links in ASDoc comments for TLFTextInput.as and TextArea.as, and add OverrideBase.as to ASDoc output
    QE notes: -
    Doc notes: -
    Bugs: -
    Reviewer: -
    Tests run: - checkintests
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/states/OverrideBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/TLFTextInput.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as

    Sorry about that. I am not exactly sure where the problem is, but I know it takes place after I put the <nav> in (in the html portion). If I understand what I am learning, the CSS at the top will structure my html code so I would have thought the CSS tageting my nav would be the focus. Maybe it is a different section though.
    CSS part:
    nav p {
    font-size: 90%;
    color: #FFC;
    text-align: right;
    font-weight: bold;
    background-color: #090;
    padding-top: 5px;
    padding-right: 20px;
    padding-bottom: 5px;
    border-top-width: 2px;
    border-top-style: solid;
    border-top-color: #060;
    HTML part: (bold italic is the part I added)
    <body>
    <div class="container">
      <div id="apDiv1"><img src="Lessons/images/butterfly-ovr.png" width="170" height="158" alt="GreenStart Logo"></div>
      <header></header>
      <nav>
        <p>Home | About Us | Contact Us</p>
      </nav>
      <div class="sidebar1">
        <ul class="nav">
          <li><a href="#">Green News</a></li>
          <li><a href="#">Green Products</a></li>
          <li><a href="#">Green Events</a></li>
          <li><a href="#">Green Travel</a></li>
          <li><a href="#">Green Tips</a></li>
        </ul>

  • How to use embedded image in TextArea in Air (differs from Flex) ?

    So I was trying the example from the LiveDocs:
    Making hyperlinks out of embedded images
    http://livedocs.adobe.com/flex/3/html/help.html?content=textcontrols_04.html
    This doesn't seem to work in an Air application (the image doesn't show).
    Even simply adding an image with a relative path doesn't work in Air (the image doesn't show either):
        <mx:Image source="../assets/butterfly.gif" />
    I'm sure I must be missing something really straightforward here, can anyone help ?
    Also, more generally, where I can see the source code of TextArea and RichTextEditor, understanding their inner working would be a great help.
    Thanks

    Embedding images in htmlText in a TextFiled isn't supported in AIR.
    See: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.ht ml#htmlText
    The source for the Flex components is included in the Flex SDK.

Maybe you are looking for

  • How to build an 8.5 report where a single source repeats with each piece of data

    I don't really know how to characterize this problem or if there is a short-hand for the type.  Here is my dilemma: I have a SQL table of tracking numbers which is custom to our version of Dynamics.  The table contains both orders and invoices.  Each

  • Problem using comma separated list with nested table element

    Hi, I have a comma separated list like that: H23004,H24005,T7231,T8231,T9231And want to create a function which is creating a where clause for each element with an output like that: UPPER('H23004') IN (UPPER(charge)) OR UPPER('H23005') IN (UPPER(char

  • Fonts in In Design CS3

    I have created a book in CS2. When I open it in CS3 it states that the fonts are missing. ie. it doesn't have them in the list. Obviously, using another negates the formatting and all the lines are incorrect lengths.The most important font is "Presti

  • Copy one playlist to iPod

    Hi there, My friend is creating a playlist for an event that she will be playing off her iPod. We would like to use my iPod as a backup, by copying only that particular playlist onto my iPod, rather then her entire library, or replacing mine. Is this

  • Contarct activation

    Hi all, I have used the existing Vendor that was created in MM while  creating the Business Partner using the transaction FLBPC1. Now while I am creating contract  from the drop down I have selected  land lord with vendor account.and create4d the con