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

Stack Overflow In RichText

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • None
    • Spark: RichText
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Firefox 3.x
      Language Found: English

    Description

      Steps to reproduce:
      1. Highlight multiple slices of text in RT
      protected function highlightText(startHightlightIndex: int, endHiglightIndex : int) : void {
      var selectionFormat : TextLayoutFormat = new TextLayoutFormat();
      var containerFormat:TextLayoutFormat = new TextLayoutFormat();
      var paragraphFormat:TextLayoutFormat = new TextLayoutFormat();
      var characterFormat:TextLayoutFormat = new TextLayoutFormat();

      if (!_editManager)

      { createEditManager(); }

      if (endHiglightIndex > startHightlightIndex && endHiglightIndex <= labelDisplay.text.length)

      { selectionFormat.backgroundColor = 0xFF99CC; selectionFormat.color = 0xFF0000; characterFormat = selectionFormat; var currentSelectionState : SelectionState = new SelectionState(RichText(labelDisplay).textFlow, startHightlightIndex, endHiglightIndex, selectionFormat); _editManager.applyFormat(characterFormat, paragraphFormat, containerFormat, currentSelectionState); }


      }

      Actual Results:

      Stack Overflow while measuring:

      flashx.textLayout.factory::TextFlowTextLineFactory/createTextLines
      spark.components::RichText/createTextLines
      spark.components::RichText/http://www.adobe.com/2006/flex/mx/internal::composeTextLines
      spark.components.supportClasses::TextBase/measure
      mx.core::UIComponent/measureSizes
      mx.core::UIComponent/validateSize
      mx.managers::LayoutManager/validateSize
      mx.managers::LayoutManager/doPhasedInstantiation
      mx.managers::LayoutManager/doPhasedInstantiationCallback

      Console trace
      undefined
      at flashx.textLayout.elements::SpanElement/get http://ns.adobe.com/textLayout/internal/2008::hasParagraphTerminator()[C:\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\elements\SpanElement.as:226]
      at flashx.textLayout.elements::SpanElement/get text()[C:\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\elements\SpanElement.as:138]
      at flashx.textLayout.elements::FlowLeafElement/http://ns.adobe.com/textLayout/internal/2008::getSpanBoundsOnLine()[C:\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\elements\FlowLeafElement.as:522]
      at flashx.textLayout.elements::FlowLeafElement/http://ns.adobe.com/textLayout/internal/2008::updateAdornments()[C:\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\elements\FlowLeafElement.as:642]
      at flashx.textLayout.compose::TextFlowLine/http://ns.adobe.com/textLayout/internal/2008::createAdornments()[C:\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\compose\TextFlowLine.as:952]
      at flashx.textLayout.compose::TextFlowLine/getTextLine()[C:\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\compose\TextFlowLine.as:823]
      at flashx.textLayout.compose::TextFlowLine/makeSelectionBlocks()[C:\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\compose\TextFlowLine.as:1580]
      at flashx.textLayout.compose::TextFlowLine/http://ns.adobe.com/textLayout/internal/2008::calculateSelectionBounds()[C:\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\compose\TextFlowLine.as:1295]
      at flashx.textLayout.elements::FlowLeafElement/http://ns.adobe.com/textLayout/internal/2008::getSpanBoundsOnLine()[C:\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\elements\FlowLeafElement.as:538]
      at flashx.textLayout.elements::FlowLeafElement/http://ns.adobe.com/textLayout/internal/2008::updateAdornments()[C:\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\elements\FlowLeafElement.as:642]
      at flashx.textLayout.compose::TextFlowLine/http://ns.adobe.com/textLayout/internal/2008::createAdornments()[C:\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\compose\TextFlowLine.as:952]

      Expected Results:

      Work as in 4.1.0.16076

      Workaround (if any):

      Not yet,
      switch back to 4.1.0.16076??
      or
      select a single slice per paragraph??
      or
      no way to show a TextFlow with multiple <p> in a single line??

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: