<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4427147453540208623</id><updated>2011-09-03T07:07:31.032-07:00</updated><title type='text'>Stefan on Flex</title><subtitle type='html'>My solutions to common and less common problems in Flex</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://stefanonflex.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4427147453540208623/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://stefanonflex.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ekerfelt</name><uri>http://www.blogger.com/profile/01455865359425689244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4427147453540208623.post-9012219667904448915</id><published>2009-11-10T13:51:00.000-08:00</published><updated>2009-11-10T14:05:44.252-08:00</updated><title type='text'>Flex Charting with LARGE datasets</title><content type='html'>A quick note and demo on something I've been working on for a while. As many of you know, it's pretty hard to render 5000+ points in the standard version of Flex Charts... the GUI hangs and won't respond until the rendering is done.. This is what I've been working on to overcome this: &lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="ImplicitDataPaging" width="100%" height="450" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"&gt;&lt;param name="movie" value="http://sites.google.com/site/ekerfeltflexsite/LargeCharts.swf"&gt;&lt;param name="quality" value="high"&gt;&lt;param name="bgcolor" value="#869ca7"&gt;&lt;param name="allowScriptAccess" value="sameDomain"&gt;&lt;embed src="http://sites.google.com/site/ekerfeltflexsite/LargeCharts.swf" quality="high" bgcolor="#869ca7" width="100%" height="450" name="ImplicitDataPaging" align="middle" play="true" loop="false" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;The demo works better in AIR, there's still some optimizing left for flash player..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4427147453540208623-9012219667904448915?l=stefanonflex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stefanonflex.blogspot.com/feeds/9012219667904448915/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://stefanonflex.blogspot.com/2009/11/flex-charting-with-large-datasets.html#comment-form' title='2 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4427147453540208623/posts/default/9012219667904448915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4427147453540208623/posts/default/9012219667904448915'/><link rel='alternate' type='text/html' href='http://stefanonflex.blogspot.com/2009/11/flex-charting-with-large-datasets.html' title='Flex Charting with LARGE datasets'/><author><name>Ekerfelt</name><uri>http://www.blogger.com/profile/01455865359425689244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4427147453540208623.post-8124574551453983781</id><published>2009-11-01T13:00:00.001-08:00</published><updated>2009-11-01T13:19:35.741-08:00</updated><title type='text'>Autosized DataGrid Columns</title><content type='html'>&lt;span class="Apple-style-span"   style="font-family:monospace;font-size:100%;"&gt;&lt;span class="Apple-style-span"  style=" white-space: pre-wrap;font-size:13px;"&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;The other day I was looking for a simple enough implementation of a datagrid which adjusted its columns based on the content. As most of the posts on this topic emphasize, it is pretty tricky since this kind of functionality needs to traverse the complete dataset to find the longest strings in a data set. I first tried to implement this using the measureText function to measure each string individually, which turned out to be a very bad idea since the measureText is a quite expensive operation. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;To increase the performance I replaced the measureText with a precalculated character size average multiplied with the string length, which turned out to dramatically improve the performance of the calculations.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Download &lt;a href="http://ekerfeltflex.googlecode.com/files/AutoResize.zip"&gt;source&lt;/a&gt; with example&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Here's an example where you can test the performance yourself by:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;1: Specify the collection size ( each item will have 12 fields )&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;2: Specify the maximum length of the randomized strings&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;3: Create the dataset (don't mind the performance issues here, this is not what we're testing)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;4: Add the dataset to the datagrid (this is where we're concerned about the performance)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="ImplicitDataPaging" width="100%" height="450" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"&gt;&lt;param name="movie" value="http://sites.google.com/site/ekerfeltflexsite/AutoResize.swf"&gt;&lt;param name="quality" value="high"&gt;&lt;param name="bgcolor" value="#869ca7"&gt;&lt;param name="allowScriptAccess" value="sameDomain"&gt;&lt;embed src="http://sites.google.com/site/ekerfeltflexsite/AutoResize.swf" quality="high" bgcolor="#869ca7" width="100%" height="450" name="ImplicitDataPaging" align="middle" play="true" loop="false" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4427147453540208623-8124574551453983781?l=stefanonflex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stefanonflex.blogspot.com/feeds/8124574551453983781/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://stefanonflex.blogspot.com/2009/11/autosized-datagrid-columns.html#comment-form' title='2 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4427147453540208623/posts/default/8124574551453983781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4427147453540208623/posts/default/8124574551453983781'/><link rel='alternate' type='text/html' href='http://stefanonflex.blogspot.com/2009/11/autosized-datagrid-columns.html' title='Autosized DataGrid Columns'/><author><name>Ekerfelt</name><uri>http://www.blogger.com/profile/01455865359425689244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4427147453540208623.post-3793137739681830061</id><published>2009-11-01T03:49:00.000-08:00</published><updated>2009-11-01T05:14:27.979-08:00</updated><title type='text'>Implicit Data Paging in Flex 3</title><content type='html'>I'm currently working on a project where we need to be able to handle search queries with large  responses. We let the user choose to either display the results in  a grid or a list (ala Windows Explorer), and we use the DataGrid and TileList to accommodate this. I googled "data paging flex 3" and found several interesting posts, but I couldn't really find a generic solution. The best solution I found was  &lt;a href="http://www.badongers.com/blog/?p=73"&gt;Badonger's extended DataGrid&lt;/a&gt;, but this just partially solves my problem since it doesn't provide a solution for all data view components. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My contribution is inspired by Badonger's DataGrid, but pulls the paging back to be handled by the Collection, and can therefore be reused in many data view components. My solution is pretty straightforward without any (major) fancy extras. It's a fresh implementation of ICollectionView (with a corresponding IViewCursor) and can be used as a dataprovider to any of the standard flex data components. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://ekerfeltflex.googlecode.com/files/ImplicitDataPaging.zip"&gt;Download the source with an example&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's an example of three components (DataGrid, TileList, List) which shares a PagedCollection with 100 000 000 entries ( I'm using a simulated data service which returns randomized strings).&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="ImplicitDataPaging" width="100%" height="250" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"&gt;&lt;param name="movie" value="http://sites.google.com/site/ekerfeltflexsite/ImplicitDataPaging.swf"&gt;&lt;param name="quality" value="high"&gt;&lt;param name="bgcolor" value="#869ca7"&gt;&lt;param name="allowScriptAccess" value="sameDomain"&gt;&lt;embed src="http://sites.google.com/site/ekerfeltflexsite/ImplicitDataPaging.swf" quality="high" bgcolor="#869ca7" width="100%" height="250" name="ImplicitDataPaging" align="middle" play="true" loop="false" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4427147453540208623-3793137739681830061?l=stefanonflex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stefanonflex.blogspot.com/feeds/3793137739681830061/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://stefanonflex.blogspot.com/2009/11/implicit-data-paging-in-flex-3.html#comment-form' title='5 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4427147453540208623/posts/default/3793137739681830061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4427147453540208623/posts/default/3793137739681830061'/><link rel='alternate' type='text/html' href='http://stefanonflex.blogspot.com/2009/11/implicit-data-paging-in-flex-3.html' title='Implicit Data Paging in Flex 3'/><author><name>Ekerfelt</name><uri>http://www.blogger.com/profile/01455865359425689244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4427147453540208623.post-170512230948902061</id><published>2009-11-01T03:43:00.000-08:00</published><updated>2009-11-01T05:10:00.135-08:00</updated><title type='text'>My contribution</title><content type='html'>I woke up this morning and realized I'd become a code leech - I browse a tremendous amount of code blogs and forums daily - but I never really contribute with anything myself. I'll try to remedy that with this blog&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4427147453540208623-170512230948902061?l=stefanonflex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stefanonflex.blogspot.com/feeds/170512230948902061/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://stefanonflex.blogspot.com/2009/11/my-contribution.html#comment-form' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4427147453540208623/posts/default/170512230948902061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4427147453540208623/posts/default/170512230948902061'/><link rel='alternate' type='text/html' href='http://stefanonflex.blogspot.com/2009/11/my-contribution.html' title='My contribution'/><author><name>Ekerfelt</name><uri>http://www.blogger.com/profile/01455865359425689244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
