Mega Code Archive

 
Categories / Flex / Data Model
 

Lazily Create and Recycle Children

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:s="library://ns.adobe.com/flex/spark">          <mx:String id="txt">this is a test.</mx:String>     <s:Scroller id="scroller">         <s:DataGroup width="150" height="120" itemRenderer="spark.skins.spark.DefaultItemRenderer">             <s:layout>                 <s:VerticalLayout useVirtualLayout="true" />             </s:layout>             <s:dataProvider>                 <mx:ArrayCollection source="{txt.split(' ')}" />             </s:dataProvider>         </s:DataGroup>     </s:Scroller>  </mx:Application>