<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: MXML text completion control v. 0.5 (aka down with combo boxes!)</title>
	<atom:link href="http://kuwamoto.org/2006/02/15/mxml-text-completion-control-v-05-aka-down-with-combo-boxes/feed/" rel="self" type="application/rss+xml" />
	<link>http://kuwamoto.org/2006/02/15/mxml-text-completion-control-v-05-aka-down-with-combo-boxes/</link>
	<description>music, technology, interfaces</description>
	<lastBuildDate>Sun, 29 Jan 2012 05:22:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: nz</title>
		<link>http://kuwamoto.org/2006/02/15/mxml-text-completion-control-v-05-aka-down-with-combo-boxes/comment-page-1/#comment-300</link>
		<dc:creator>nz</dc:creator>
		<pubDate>Sat, 06 May 2006 20:13:45 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=43#comment-300</guid>
		<description>Just mainly for eye candy :) e.g. maybe we want to show the text and description on the next line, or an icon next to each of the items in the list etc like you can with the lists in combo boxes etc.

Agree with Kevin though, hope too see a community developing Flex 2 components etc

cheers</description>
		<content:encoded><![CDATA[<p>Just mainly for eye candy :) e.g. maybe we want to show the text and description on the next line, or an icon next to each of the items in the list etc like you can with the lists in combo boxes etc.</p>
<p>Agree with Kevin though, hope too see a community developing Flex 2 components etc</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sho</title>
		<link>http://kuwamoto.org/2006/02/15/mxml-text-completion-control-v-05-aka-down-with-combo-boxes/comment-page-1/#comment-298</link>
		<dc:creator>sho</dc:creator>
		<pubDate>Sat, 06 May 2006 02:40:45 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=43#comment-298</guid>
		<description>Thanks, nz.

I probably won&#039;t support itemRenderer, although you&#039;re more than welcome to add it. (Shouldn&#039;t be too much work, since the list is built using a List control, which already knows about itemRenderer).

The main reasons are:

1) I wanted to create a control of moderate complexity to illustrate what it&#039;s like to create a control. It doesn&#039;t do everything that the framework controls do (so it&#039;s much easier to read and understand), but it is complex enough that it gets into some meaty issues.

2) Auto-complete implies that the items are strings, or at least have a strong relationship to strings. This does not mean that I can&#039;t imagine ways to use item renderers. However, it does mean that you&#039;re somewhat less likely to need them in auto-complete controls than in, say, TileList, which is just a way of laying stuff out on the screen.

Of course, if enough people ask for it, or if you can help me think of some cool use cases, you might end up convincing me after all...</description>
		<content:encoded><![CDATA[<p>Thanks, nz.</p>
<p>I probably won&#8217;t support itemRenderer, although you&#8217;re more than welcome to add it. (Shouldn&#8217;t be too much work, since the list is built using a List control, which already knows about itemRenderer).</p>
<p>The main reasons are:</p>
<p>1) I wanted to create a control of moderate complexity to illustrate what it&#8217;s like to create a control. It doesn&#8217;t do everything that the framework controls do (so it&#8217;s much easier to read and understand), but it is complex enough that it gets into some meaty issues.</p>
<p>2) Auto-complete implies that the items are strings, or at least have a strong relationship to strings. This does not mean that I can&#8217;t imagine ways to use item renderers. However, it does mean that you&#8217;re somewhat less likely to need them in auto-complete controls than in, say, TileList, which is just a way of laying stuff out on the screen.</p>
<p>Of course, if enough people ask for it, or if you can help me think of some cool use cases, you might end up convincing me after all&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nz</title>
		<link>http://kuwamoto.org/2006/02/15/mxml-text-completion-control-v-05-aka-down-with-combo-boxes/comment-page-1/#comment-297</link>
		<dc:creator>nz</dc:creator>
		<pubDate>Fri, 05 May 2006 23:53:51 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=43#comment-297</guid>
		<description>This is pretty cool

Will this component support itemRenderer as per normal Flex combox in the future?

so that the &quot;dropdown list&quot; can render more then just text?

cheers</description>
		<content:encoded><![CDATA[<p>This is pretty cool</p>
<p>Will this component support itemRenderer as per normal Flex combox in the future?</p>
<p>so that the &#8220;dropdown list&#8221; can render more then just text?</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sho</title>
		<link>http://kuwamoto.org/2006/02/15/mxml-text-completion-control-v-05-aka-down-with-combo-boxes/comment-page-1/#comment-195</link>
		<dc:creator>Sho</dc:creator>
		<pubDate>Fri, 24 Mar 2006 16:46:28 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=43#comment-195</guid>
		<description>I&#039;ll be posting an updated example shortly. Thanks!
</description>
		<content:encoded><![CDATA[<p>I&#8217;ll be posting an updated example shortly. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: milan</title>
		<link>http://kuwamoto.org/2006/02/15/mxml-text-completion-control-v-05-aka-down-with-combo-boxes/comment-page-1/#comment-194</link>
		<dc:creator>milan</dc:creator>
		<pubDate>Fri, 24 Mar 2006 08:56:32 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=43#comment-194</guid>
		<description>This is really nice example, but it doesn&#039;t works in flex 2 beta 2 (some problem with ModelChangedEvent). Would you update it to work with beta 2?
Thanks,
Milan</description>
		<content:encoded><![CDATA[<p>This is really nice example, but it doesn&#8217;t works in flex 2 beta 2 (some problem with ModelChangedEvent). Would you update it to work with beta 2?<br />
Thanks,<br />
Milan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sho Kuwamoto</title>
		<link>http://kuwamoto.org/2006/02/15/mxml-text-completion-control-v-05-aka-down-with-combo-boxes/comment-page-1/#comment-193</link>
		<dc:creator>Sho Kuwamoto</dc:creator>
		<pubDate>Thu, 16 Feb 2006 22:54:58 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=43#comment-193</guid>
		<description>Todd: yes, you need 8.5

Kevin: Glad this helps!

Steven: Interesting you mention this. I played around with this approach but decided to go with sorted lists instead, because they were easier for me to think about and seemed fast enough.

The data structure you describe in your article is a trie (sometimes pronounced &quot;tree&quot;, sometimes pronounced &quot;try&quot;). It is definitely the fastest data structure for doing prefix filtering, but takes the most space. There is a variant which is more space efficient called a Patricia Tree, which collapses nodes that only have one child. There are other popular variants, in which an array is sorted, and then a jump table is built for the first several characters that point to indices in the sorted array. Kind of a like a trie that points into an array.

Theoretically, a trie is a constant time lookup for fixed key lengths, whereas I am using a binary search, which is a log N process. However, the main performance issues arise not in the lookup, but the handling of the data after the lookup.

When no characters have been typed, the filtered result is the same as the original list of strings. In my code, these strings are copied into a separate array. That is obviously an order N operation. There is also a just-as-obvious solution to this, which is to make an empty prefix a special case and return the original array instead of a copy.

Finally, I deal with the sort order of the results by creating my list of candidates and then sorting them. This is an N log N operation. If you can help me speed this up, this would be the biggest bang.

In any event, if you can help me make this code faster, I&#039;d be all for it!</description>
		<content:encoded><![CDATA[<p>Todd: yes, you need 8.5</p>
<p>Kevin: Glad this helps!</p>
<p>Steven: Interesting you mention this. I played around with this approach but decided to go with sorted lists instead, because they were easier for me to think about and seemed fast enough.</p>
<p>The data structure you describe in your article is a trie (sometimes pronounced &#8220;tree&#8221;, sometimes pronounced &#8220;try&#8221;). It is definitely the fastest data structure for doing prefix filtering, but takes the most space. There is a variant which is more space efficient called a Patricia Tree, which collapses nodes that only have one child. There are other popular variants, in which an array is sorted, and then a jump table is built for the first several characters that point to indices in the sorted array. Kind of a like a trie that points into an array.</p>
<p>Theoretically, a trie is a constant time lookup for fixed key lengths, whereas I am using a binary search, which is a log N process. However, the main performance issues arise not in the lookup, but the handling of the data after the lookup.</p>
<p>When no characters have been typed, the filtered result is the same as the original list of strings. In my code, these strings are copied into a separate array. That is obviously an order N operation. There is also a just-as-obvious solution to this, which is to make an empty prefix a special case and return the original array instead of a copy.</p>
<p>Finally, I deal with the sort order of the results by creating my list of candidates and then sorting them. This is an N log N operation. If you can help me speed this up, this would be the biggest bang.</p>
<p>In any event, if you can help me make this code faster, I&#8217;d be all for it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Penner</title>
		<link>http://kuwamoto.org/2006/02/15/mxml-text-completion-control-v-05-aka-down-with-combo-boxes/comment-page-1/#comment-192</link>
		<dc:creator>Robert Penner</dc:creator>
		<pubDate>Thu, 16 Feb 2006 22:23:36 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=43#comment-192</guid>
		<description>On second look, &quot;c&quot; it doesn&#039;t pull up &quot;pistachio&quot; because it isn&#039;t in the list. =) But if it were it would.</description>
		<content:encoded><![CDATA[<p>On second look, &#8220;c&#8221; it doesn&#8217;t pull up &#8220;pistachio&#8221; because it isn&#8217;t in the list. =) But if it were it would.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Penner</title>
		<link>http://kuwamoto.org/2006/02/15/mxml-text-completion-control-v-05-aka-down-with-combo-boxes/comment-page-1/#comment-191</link>
		<dc:creator>Robert Penner</dc:creator>
		<pubDate>Thu, 16 Feb 2006 22:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=43#comment-191</guid>
		<description>One little thing that would help is to have the search string highlighted in the suggested completions. The most common autocomplete systems (like in IE and Firefox) only use the first letter to filter. For people not accustomed to substring filtering, they may be confused as to why &quot;c&quot; pulls up &quot;pistachio&quot;.</description>
		<content:encoded><![CDATA[<p>One little thing that would help is to have the search string highlighted in the suggested completions. The most common autocomplete systems (like in IE and Firefox) only use the first letter to filter. For people not accustomed to substring filtering, they may be confused as to why &#8220;c&#8221; pulls up &#8220;pistachio&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Belanger</title>
		<link>http://kuwamoto.org/2006/02/15/mxml-text-completion-control-v-05-aka-down-with-combo-boxes/comment-page-1/#comment-190</link>
		<dc:creator>Mark Belanger</dc:creator>
		<pubDate>Thu, 16 Feb 2006 20:55:34 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=43#comment-190</guid>
		<description>I definitely like it.  One comment, it would be a better proof of concept if you used the countries in both examples.</description>
		<content:encoded><![CDATA[<p>I definitely like it.  One comment, it would be a better proof of concept if you used the countries in both examples.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Webster</title>
		<link>http://kuwamoto.org/2006/02/15/mxml-text-completion-control-v-05-aka-down-with-combo-boxes/comment-page-1/#comment-189</link>
		<dc:creator>Steven Webster</dc:creator>
		<pubDate>Thu, 16 Feb 2006 20:44:45 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=43#comment-189</guid>
		<description>hey Sho - nice work !  In the entry on the iteration::two blog at &lt;a href=&quot;http://www.richinternetapps.com/archives/000079.html&quot; rel=&quot;nofollow&quot;&gt;http://www.richinternetapps.com/archives/000079.html&lt;/a&gt; we posted an example of an optimisation for this sort of functionality - we didn&#039;t publish the source (because we were iteration::two back then, and had to keep SOME goodness to ourselves :) ) but I&#039;ll see if we can dig out some source to share on the implementation.

In the meantime, it might be a good approach to incorporate into your component (which has a nicer UI to show the possible completions in a drop-down).

Hope to catch up with you again soon - Steven.</description>
		<content:encoded><![CDATA[<p>hey Sho &#8211; nice work !  In the entry on the iteration::two blog at <a href="http://www.richinternetapps.com/archives/000079.html" rel="nofollow">http://www.richinternetapps.com/archives/000079.html</a> we posted an example of an optimisation for this sort of functionality &#8211; we didn&#8217;t publish the source (because we were iteration::two back then, and had to keep SOME goodness to ourselves :) ) but I&#8217;ll see if we can dig out some source to share on the implementation.</p>
<p>In the meantime, it might be a good approach to incorporate into your component (which has a nicer UI to show the possible completions in a drop-down).</p>
<p>Hope to catch up with you again soon &#8211; Steven.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

