flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad White (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FLEX-34080) Arraycollection index turns upside down when refresh
Date Sun, 07 Dec 2014 16:34:13 GMT

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

Brad White edited comment on FLEX-34080 at 12/7/14 4:33 PM:
------------------------------------------------------------

I get this same issue but when I add an itemRenderer with states. Use the same code as above
but with this itemRenderer. Change one of the states of an itemRenderer and then refresh()
the collection. It flips every time.

{code}
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
				xmlns:s="library://ns.adobe.com/flex/spark" 
				xmlns:mx="library://ns.adobe.com/flex/mx" 
				autoDrawBackground="true">
	<s:states>
		<s:State name="stateAAA" />
		<s:State name="stateBBB" />
	</s:states>
	<s:HGroup width="100%">
		<s:Label text="stateAAA" 
				 click="{currentState='stateBBB'}" 
				 includeIn="stateAAA" />
		<s:Label text="stateBBB" 
				 click="{currentState='stateAAA'}"
				 includeIn="stateBBB" />
		<s:Label text="({this.currentState})" fontStyle="italic" />
		<s:Label text="{data}"/>
	</s:HGroup>
</s:ItemRenderer>
{code}

{code}
<?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" 
			   xmlns:mx="library://ns.adobe.com/flex/mx" 
			   minWidth="955" minHeight="600">
	
	<s:layout>
		<s:VerticalLayout />
	</s:layout>
	
	<fx:Script>
		<![CDATA[
			import mx.collections.ArrayCollection;
			import mx.events.FlexEvent;
			
			import spark.collections.Sort;
			
			[Bindable] public var data:ArrayCollection = new ArrayCollection(["one","two","three","four","five","six","seven","eight","nine","ten"]);
	
			
			protected function init(event:FlexEvent):void
			{
				data.sort = new Sort();
				data.refresh();
			}
			
		]]>
	</fx:Script>
	
	<s:List dataProvider="{data}" 
			itemRenderer="TestItemRenderer"
			useVirtualLayout="true" />
	
	<s:Button click="data.refresh()" />
	
</s:Application>
{code}


was (Author: brad.white):
I get this same issue but when I add an itemRenderer with states. Use the same code as above
but with this itemRenderer. Change one of the states of an itemRenderer and then refresh()
the collection. It flips every time.

<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
				xmlns:s="library://ns.adobe.com/flex/spark" 
				xmlns:mx="library://ns.adobe.com/flex/mx" 
				autoDrawBackground="true">
	<s:states>
		<s:State name="stateAAA" />
		<s:State name="stateBBB" />
	</s:states>
	<s:HGroup width="100%">
		<s:Label text="stateAAA" 
				 click="{currentState='stateBBB'}" 
				 includeIn="stateAAA" />
		<s:Label text="stateBBB" 
				 click="{currentState='stateAAA'}"
				 includeIn="stateBBB" />
		<s:Label text="({this.currentState})" fontStyle="italic" />
		<s:Label text="{data}"/>
	</s:HGroup>
</s:ItemRenderer>

> Arraycollection index turns upside down when refresh
> ----------------------------------------------------
>
>                 Key: FLEX-34080
>                 URL: https://issues.apache.org/jira/browse/FLEX-34080
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Spark: List
>    Affects Versions: Apache Flex 4.11.0
>         Environment: Windows 7 64bit, Flash Builder 4.6
>            Reporter: victor yew
>            Assignee: Justin Mclean
>              Labels: easyfix
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The spark list turns upside down when arraycollection.refresh() is called. This only
happen when usevirtuallayout is set to true.



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

Mime
View raw message