Jeff Pritchard wrote:
> I put together a search based on a text field and a form observer.  ...> 
> What happens visually is that if you type a few characters quickly, you
> get the expected short list of results...followed a second or two later
> by the larger result set appropriate to the first character typed.  The
> logging confirms that the rails app is doing the right thing in the
> right order.
> 
...>
> thanks,
> Jeff

Just a quick note in case somebody stumbles upon this doing a search 
some day.  The solution was actually to slow down the observer.  I 
changed the observer time to 1.5 seconds (used to have it at 0.1 
seconds, when I didn't understand the underlying mechanism that was 
making it fail).  Now when you type at either slow or fast speeds 
everything gets to the browser in the proper order and all is well.  It 
basically just winds up not even seeing the first letter you type by 
itself, but rather sees it together with the second letter when you are 
typing at normal speeds.  Typing really slowly, there is time for the 
first response to get back to the browser before the second character is 
typed into the search field.

Works well now.

jp
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to