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

[TLF 2468675] TextFlow Object Fails in conversion at ByteArray.readObject()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Adobe Flex SDK Previous
    • None
    • Spark: FTETextField
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows XP
      Browser: Firefox 3.x
      Language Found: English

    Description

      Steps to reproduce:
      1. Compile and debug (not run) the attached MXML file.

      Actual Results:
      The following text is displayed in Builder's console:
      TypeError: Error #1034: Type Coercion failed: cannot convert Object@61b6041 to flashx.textLayout.compose.IFlowComposer
      TypeError: Bad element of type flashx.textLayout.elements::TextFlow passed to FlowGroupElement.mxmlChildren
      TypeError: Bad element of type flashx.textLayout.elements::TextFlow passed to FlowGroupElement.mxmlChildren
      TypeError: Error #1034: Type Coercion failed: cannot convert Object@61b6659 to flashx.textLayout.formats.ITextLayoutFormat
      dat is TextFlow :true

      Expected Results:
      dat is TextFlow :true

      Workaround (if any):
      None.


      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" initialize="f();">

      <fx:Script>
      <![CDATA[
      import flashx.textLayout.elements.ParagraphElement;
      import flashx.textLayout.elements.SpanElement;
      import flashx.textLayout.elements.TextFlow;

      private function f():void

      { var s:SpanElement = new SpanElement(); s.text = "hello world"; var p:ParagraphElement = new ParagraphElement(); p.addChild(s) var tf:TextFlow = new TextFlow(); tf.addChild( p ); var ba:ByteArray = new ByteArray(); registerClassAlias( "TextFlow", TextFlow ); ba.writeObject( tf ); ba.position = 0; var dat:* = ba.readObject(); trace( "dat is TextFlow :" + ( dat is TextFlow ) ); }


      ]]
      >
      </fx:Script>

      </s:Application>

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: