<?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: Find as you type sorting on large record sets</title>
	<atom:link href="http://www.craftymind.com/2007/02/11/find-as-you-type-sorting-on-large-record-sets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.craftymind.com/2007/02/11/find-as-you-type-sorting-on-large-record-sets/</link>
	<description>Hacking away at UI development</description>
	<lastBuildDate>Thu, 09 Sep 2010 19:23:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jenry</title>
		<link>http://www.craftymind.com/2007/02/11/find-as-you-type-sorting-on-large-record-sets/comment-page-1/#comment-20296</link>
		<dc:creator>jenry</dc:creator>
		<pubDate>Tue, 09 Mar 2010 00:19:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.craftymind.com/?p=4#comment-20296</guid>
		<description>sorry it should be:

i = attributelist.indexOf(â€&gt;â€, pos);</description>
		<content:encoded><![CDATA[<p>sorry it should be:</p>
<p>i = attributelist.indexOf(â€&gt;â€, pos);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jenry</title>
		<link>http://www.craftymind.com/2007/02/11/find-as-you-type-sorting-on-large-record-sets/comment-page-1/#comment-20295</link>
		<dc:creator>jenry</dc:creator>
		<pubDate>Tue, 09 Mar 2010 00:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.craftymind.com/?p=4#comment-20295</guid>
		<description>Thanks Cornelius for the fix.
I have another change:
this line:
i = pos+term.length;

to this:
i = pos+attributelist.indexOf(&quot;&gt;&quot;, pos);

(we can also reuse the seach of &quot;&gt;&quot; made before...)

In that way we can be sure our output doesn&#039;t have repeated results.</description>
		<content:encoded><![CDATA[<p>Thanks Cornelius for the fix.<br />
I have another change:<br />
this line:<br />
i = pos+term.length;</p>
<p>to this:<br />
i = pos+attributelist.indexOf(&#8220;&gt;&#8221;, pos);</p>
<p>(we can also reuse the seach of &#8220;&gt;&#8221; made before&#8230;)</p>
<p>In that way we can be sure our output doesn&#8217;t have repeated results.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jenry</title>
		<link>http://www.craftymind.com/2007/02/11/find-as-you-type-sorting-on-large-record-sets/comment-page-1/#comment-20294</link>
		<dc:creator>jenry</dc:creator>
		<pubDate>Mon, 08 Mar 2010 23:44:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.craftymind.com/?p=4#comment-20294</guid>
		<description>Can you publish your xmlFile so we can make our own test based on it?
Thanks!</description>
		<content:encoded><![CDATA[<p>Can you publish your xmlFile so we can make our own test based on it?<br />
Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cornelius</title>
		<link>http://www.craftymind.com/2007/02/11/find-as-you-type-sorting-on-large-record-sets/comment-page-1/#comment-66</link>
		<dc:creator>Cornelius</dc:creator>
		<pubDate>Fri, 18 Apr 2008 15:51:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.craftymind.com/?p=4#comment-66</guid>
		<description>Hi,

thanks for the code, it really helped a lot. I found a little flaw in it: If the user types in a number which matches an index in the filtertext variable the first XML node is returned.

To avoid this change
[code]
pos = attributelist.indexOf(term, i);
if(pos &gt; -1){
  index = int( attributelist.substring(attributelist.indexOf(&quot;&quot;, pos)) );
  output[count] = list[index];
  count++;
  i = pos+term.length;
}
[/code]

to

[code]
pos = attributelist.indexOf(term, i);
if(pos &gt; -1){
  if (attributelist.charAt(pos-1) != &quot;&lt;&quot;){
    index = int( attributelist.substring(attributelist.indexOf(&quot;&quot;, pos)) );
    output[count] = list[index];
    count++;
  }
  i = (pos + term.length &lt; attributelist.length) ? pos + term.length : -1;
}
[/code]


I hope I got the code highlighting right ;)</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>thanks for the code, it really helped a lot. I found a little flaw in it: If the user types in a number which matches an index in the filtertext variable the first XML node is returned.</p>
<p>To avoid this change<br />
[code]<br />
pos = attributelist.indexOf(term, i);<br />
if(pos &gt; -1){<br />
  index = int( attributelist.substring(attributelist.indexOf("", pos)) );<br />
  output[count] = list[index];<br />
  count++;<br />
  i = pos+term.length;<br />
}<br />
[/code]</p>
<p>to</p>
<p>[code]<br />
pos = attributelist.indexOf(term, i);<br />
if(pos &gt; -1){<br />
  if (attributelist.charAt(pos-1) != "&lt;"){<br />
    index = int( attributelist.substring(attributelist.indexOf("", pos)) );<br />
    output[count] = list[index];<br />
    count++;<br />
  }<br />
  i = (pos + term.length &lt; attributelist.length) ? pos + term.length : -1;<br />
}<br />
[/code]</p>
<p>I hope I got the code highlighting right <img src='http://www.craftymind.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Christmann</title>
		<link>http://www.craftymind.com/2007/02/11/find-as-you-type-sorting-on-large-record-sets/comment-page-1/#comment-10</link>
		<dc:creator>Sean Christmann</dc:creator>
		<pubDate>Mon, 03 Mar 2008 02:49:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.craftymind.com/?p=4#comment-10</guid>
		<description>Hey guys, I just moved over to a new publishing system so the code above should be showing correctly now.</description>
		<content:encoded><![CDATA[<p>Hey guys, I just moved over to a new publishing system so the code above should be showing correctly now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Wright</title>
		<link>http://www.craftymind.com/2007/02/11/find-as-you-type-sorting-on-large-record-sets/comment-page-1/#comment-9</link>
		<dc:creator>John Wright</dc:creator>
		<pubDate>Fri, 02 Nov 2007 02:32:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.craftymind.com/?p=4#comment-9</guid>
		<description>Actually, that is wrong above. It should be:

i = attributelist.indexOf(â€&gt;â€, pos);

donâ€™t add the pos, that will mess things up.</description>
		<content:encoded><![CDATA[<p>Actually, that is wrong above. It should be:</p>
<p>i = attributelist.indexOf(â€&gt;â€, pos);</p>
<p>donâ€™t add the pos, that will mess things up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Wright</title>
		<link>http://www.craftymind.com/2007/02/11/find-as-you-type-sorting-on-large-record-sets/comment-page-1/#comment-8</link>
		<dc:creator>John Wright</dc:creator>
		<pubDate>Wed, 31 Oct 2007 02:32:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.craftymind.com/?p=4#comment-8</guid>
		<description>Arne, I found a solution for multiple fields. In the searchStringInAttribute method replace the setting of the new search position with this line:

i = pos + attributelist.indexOf(â€&gt;â€, pos);

instead of what it is currently. This way when 1 match is found in the row it will go onto the next row.</description>
		<content:encoded><![CDATA[<p>Arne, I found a solution for multiple fields. In the searchStringInAttribute method replace the setting of the new search position with this line:</p>
<p>i = pos + attributelist.indexOf(â€&gt;â€, pos);</p>
<p>instead of what it is currently. This way when 1 match is found in the row it will go onto the next row.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arand</title>
		<link>http://www.craftymind.com/2007/02/11/find-as-you-type-sorting-on-large-record-sets/comment-page-1/#comment-7</link>
		<dc:creator>arand</dc:creator>
		<pubDate>Thu, 18 Oct 2007 02:31:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.craftymind.com/?p=4#comment-7</guid>
		<description>I added code to pull additional text from other attributes however sometimes there are multiple occurrences of search term and the output will send multiple instances of that node. Any way to prevent that?</description>
		<content:encoded><![CDATA[<p>I added code to pull additional text from other attributes however sometimes there are multiple occurrences of search term and the output will send multiple instances of that node. Any way to prevent that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arne</title>
		<link>http://www.craftymind.com/2007/02/11/find-as-you-type-sorting-on-large-record-sets/comment-page-1/#comment-6</link>
		<dc:creator>Arne</dc:creator>
		<pubDate>Wed, 16 May 2007 02:31:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.craftymind.com/?p=4#comment-6</guid>
		<description>Now I understand: â€œinsâ€ and â€\insâ€ as tags are some artefacts of your blogging tool; both should just be â€+â€ in AS code.

Sorry :-)</description>
		<content:encoded><![CDATA[<p>Now I understand: â€œinsâ€ and â€\insâ€ as tags are some artefacts of your blogging tool; both should just be â€+â€ in AS code.</p>
<p>Sorry <img src='http://www.craftymind.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arne</title>
		<link>http://www.craftymind.com/2007/02/11/find-as-you-type-sorting-on-large-record-sets/comment-page-1/#comment-5</link>
		<dc:creator>Arne</dc:creator>
		<pubDate>Wed, 16 May 2007 02:30:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.craftymind.com/?p=4#comment-5</guid>
		<description>I donÂ´t get it; what exactly happens here:
â€”â€”â€”
for each(node in rawXMLList){
fullNameIndex = node.@fullName.toLowerCase()â€â€; count++; }
â€”â€”
What is this about and where does this come from?
I am very curious, because I need more XML parsing speed very urgent.

Kind regards
______
Arne</description>
		<content:encoded><![CDATA[<p>I donÂ´t get it; what exactly happens here:<br />
â€”â€”â€”<br />
for each(node in rawXMLList){<br />
fullNameIndex = <a href="mailto:node.@fullName.toLowerCase">node.@fullName.toLowerCase</a>()â€â€; count++; }<br />
â€”â€”<br />
What is this about and where does this come from?<br />
I am very curious, because I need more XML parsing speed very urgent.</p>
<p>Kind regards<br />
______<br />
Arne</p>
]]></content:encoded>
	</item>
</channel>
</rss>
