flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mihai Chira (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-18746) Exception inside expandItem() when collapsing branch with all items removed since branch opening
Date Mon, 14 Aug 2017 18:01:00 GMT

    [ https://issues.apache.org/jira/browse/FLEX-18746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16126095#comment-16126095
] 

Mihai Chira commented on FLEX-18746:
------------------------------------

To reproduce (in 4.16) run Tree_FLEX_18746_Tests.as.

> Exception inside expandItem() when collapsing branch with all items removed since branch
opening
> ------------------------------------------------------------------------------------------------
>
>                 Key: FLEX-18746
>                 URL: https://issues.apache.org/jira/browse/FLEX-18746
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: mx: Tree
>    Affects Versions: Adobe Flex SDK 3.2 (Release)
>         Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Language Found: English
>            Reporter: Adobe JIRA
>            Assignee: Mihai Chira
>
>       Steps to reproduce:
> Launch the following example and wait 6 sec:
> <?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 mx.collections.ArrayCollection;
> 	
> 	[Bindable]	
> 	private var dataProvider:ArrayCollection;
> 	
> 	private var folder0:Object;
> 	
> 	private var folder1:Object;
> 	
> 	private var item:Object;
> 	
> 	private function init():void
> 	{
> 		dataProvider = new ArrayCollection();
> 		folder0 = { label: "Some folder 0", children: new ArrayCollection() };
> 		item = { label: "Item" };
> 		folder1 = { label: "Some folder 1", children: new ArrayCollection([ item ]) };
> 		dataProvider.addItem(folder1);
> 		
> 		var timer1:Timer = new Timer(2000, 1);
> 		timer1.addEventListener(TimerEvent.TIMER, timer1_timerHandler);
> 		timer1.start();
> 		
> 		var timer2:Timer = new Timer(4000, 1);
> 		timer2.addEventListener(TimerEvent.TIMER, timer2_timerHandler);
> 		timer2.start();
> 		
> 		var timer3:Timer = new Timer(6000, 1);
> 		timer3.addEventListener(TimerEvent.TIMER, timer3_timerHandler);
> 		timer3.start();
> 	}
> 	
> 	private function timer1_timerHandler(event:TimerEvent):void
> 	{
> 		tree.expandItem(folder1, true, true, true);
> 	}
> 	
> 	private function timer2_timerHandler(event:TimerEvent):void
> 	{
> 		dataProvider.addItemAt(folder0, 0);
> 		ArrayCollection(folder1.children).removeItemAt(0);
> 		tree.expandItem(folder0, true, true, true);
> 		ArrayCollection(folder0.children).addItem(item);
> 	}
> 	
> 	private function timer3_timerHandler(event:TimerEvent):void
> 	{
> 		tree.expandItem(folder1, false, true, true);
> 	}
> 	
> ]]
>       >
> </mx:Script>
> 	<mx:Label text="Just wait 6 sec and you'll see the exception." fontSize="20"
> 		top="50" horizontalCenter="0"/>
> 	<mx:Tree dataProvider="{dataProvider}" id="tree" width="200" height="200"
> 		horizontalCenter="0" verticalCenter="0"/>
> </mx:Application>
> Actual Results:
> TypeError: Error #1010: Term is undefined and has no properties
> at mx.controls::Tree/expandItem()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\Tree.as:1772]
> at mx.controls::Tree/http://www.adobe.com/2006/flex/mx/internal::expandItemHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\Tree.as:3418]
> at flash.events::EventDispatcher/dispatchEventFunction()
> at flash.events::EventDispatcher/dispatchEvent()
> at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298]
> at mx.controls::Tree/http://www.adobe.com/2006/flex/mx/internal::dispatchTreeEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\Tree.as:3334]
> at mx.controls.treeClasses::TreeItemRenderer/disclosureMouseDownHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\treeClasses\TreeItemRenderer.as:594]
>  
> Expected Results:
> Node collapse without exception 
>  
> Workaround (if any):
> Do not use open/close animation, ex. set <mx:Tree openDuration="0"/>
>     



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message