This project is read-only.

Anyone still maintaining this?

Apr 10, 2012 at 1:28 AM

Is the author still around and maintaining this?  I'm using it and have found a bug which I am starting to write a fix for, but would love for everyone to be able to benefit from it.

 

Apr 10, 2012 at 6:21 PM

I’m still around, but I’m unfortunately way behind on maintaining it. If you would like to send me your code, I’ll do my best to get it in.

Thanks,

Noah

From: apatt [email removed]
Sent: Monday, April 09, 2012 5:29 PM
To: Noah Heldman
Subject: Anyone still maintaining this? [flexbox:351723]

From: apatt

Is the author still around and maintaining this? I'm using it and have found a bug which I am starting to write a fix for, but would love for everyone to be able to benefit from it.

Apr 10, 2012 at 10:20 PM

When I wrote the e-mail, I thought it was a simple fix, but I have been staring at the problem all day trying different things.. I'm still happy to write the fix, but need some help as to how to get it fixed.


Here is what is happening..

I'm doing an autocomplete which makes a JSON call.. What is happening is that as I type the term "footloose" it will make all of the calls (foot, footl, footlo, etc) and I can see in firefox that they are all being processed (callback is being called for all of them which in turn is calling displayItems with the correct data), the box is only showing me the result of "foot". If I delete the last character (e) and put it back, then it pulls the results from the cache just fine.

I thought it might have been an out of order thing where the results of one JSON call was coming in out of order from when it was requested, but that does not seem to be the case. I can watch in Firebug displayItems being called again and again with the correct data, but it's not updating the list on the page. Any idea what I am missing?

Apr 11, 2012 at 1:03 AM

Yes, there are some timing issues with the callback and the cache. The correct approach to solving this is the one that Google Suggest uses, which is to initiate the query every 500 ms, and grab whatever is in the text box at that time to run the query (assuming it has changed in that time).

That would apply to the cache as well; if the value had changed between calls, it would update the cache and re-display.

This enhancement is on my list, but I haven’t had to implement it yet.

Chris Justus tried to dissect their algorithm eight (!) years ago (http://serversideguy.blogspot.com/2004/12/google-suggest-dissected.html), and I tried the same based on his logic, but it turned out to be a fairly involved prospect.

If you feel like going down that path, let me know, and I’ll fully support getting it into the codebase!

Thanks,

Noah

From: apatt [email removed]
Sent: Tuesday, April 10, 2012 2:21 PM
To: Noah Heldman
Subject: Re: Anyone still maintaining this? [flexbox:351723]

From: apatt

When I wrote the e-mail, I thought it was a simple fix, but I have been staring at the problem all day trying different things.. I'm still happy to write the fix, but need some help as to how to get it fixed.


Here is what is happening..

I'm doing an autocomplete which makes a JSON call.. What is happening is that as I type the term "footloose" it will make all of the calls (foot, footl, footlo, etc) and I can see in firefox that they are all being processed (callback is being called for all of them which in turn is calling displayItems with the correct data), the box is only showing me the result of "foot". If I delete the last character (e) and put it back, then it pulls the results from the cache just fine.

I thought it might have been an out of order thing where the results of one JSON call was coming in out of order from when it was requested, but that does not seem to be the case. I can watch in Firebug displayItems being called again and again with the correct data, but it's not updating the list on the page. Any idea what I am missing?