flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alessandro Palombaro (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLEX-34744) TextFlowElement parent nulled when addChild method used via parent reference
Date Mon, 09 Feb 2015 09:16:34 GMT
Alessandro Palombaro created FLEX-34744:
-------------------------------------------

             Summary: TextFlowElement parent nulled when addChild method used via parent reference
                 Key: FLEX-34744
                 URL: https://issues.apache.org/jira/browse/FLEX-34744
             Project: Apache Flex
          Issue Type: Bug
    Affects Versions: Apache Flex 4.14.0
            Reporter: Alessandro Palombaro


<?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"
               applicationComplete="_this_applicationCompleteHandler(event)" frameRate="60"
               initialize="_this_initializeHandler(event)" backgroundAlpha="0">

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

		import mx.events.FlexEvent;

		import spark.utils.TextFlowUtil;

		//--------------------------------------------------------------------------
		//
		// Event Handlers
		//
		//--------------------------------------------------------------------------

		protected function _this_initializeHandler(event:FlexEvent):void
		{
		}

		protected function _this_applicationCompleteHandler(event:FlexEvent):void
		{
			var flow:TextFlow = TextFlowUtil.importFromXML(xml);

			var span:SpanElement = new SpanElement();
			var target:FlowElement = flow.getElementByID("SpanElementId") as SpanElement;

			trace("EngineTesting._this_applicationCompleteHandler", target.parent);

			target.parent.addChild(span);

			trace("EngineTesting._this_applicationCompleteHandler", target.parent);

			richText.textFlow = flow;
		}
		]]>
	</fx:Script>

	<fx:Declarations>
		<fx:XML id="xml">
			<div>
				<p><span id="SpanElementId" uid="5501" width="250" height="180"/></p>
				<p>Hello World.</p>
			</div>
		</fx:XML>
	</fx:Declarations>
	
	<s:RichText width="100%" id="richText"/>
	
</s:Application>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message