ClintonStrong Posted March 23, 2013 Share Posted March 23, 2013 (edited) I'm using v2.0.2 (178) on OS X 10.8.3. When I type quickly, Alfred doesn't update its results to reflect that query. Alfred still runs the script filter with the correct query, it just doesn't display the updated results. I noticed this mostly seems to happen with slow scripts, like those that load network resources. To replicate it, I just made a simple workflow that waits half a second before outputting the XML, and filters them based on your query. If I type "asdf" slowly, it shouldn't match any results. However, if I type it fast (or if I just mash all the keys at the same time), it shows the results as if I had only typed the first letter ("a"). (You can download the workflow here.) I confirmed that the script filter is being run with the correct query and is displaying the correct output (it writes to last_query.txt and last_output.xml in the workflow folder), but it looks like Alfred isn't keeping up and doesn't update the results. Edit: Just to clarify, you can check last_query.txt and last_output.xml in the workflow folder after running it to see what the correct output should have been. Edited March 23, 2013 by Clinton Strong Link to comment Share on other sites More sharing options...
jdfwarrior Posted March 23, 2013 Share Posted March 23, 2013 I'm using v2.0.2 (178) on OS X 10.8.3. When I type quickly, Alfred doesn't update its results to reflect that query. Alfred still runs the script filter with the correct query, it just doesn't display the updated results. I noticed this mostly seems to happen with slow scripts, like those that load network resources. To replicate it, I just made a simple workflow that waits half a second before outputting the XML, and filters them based on your query. If I type "asdf" slowly, it shouldn't match any results. However, if I type it fast (or if I just mash all the keys at the same time), it shows the results as if I had only typed the first letter ("a"). (You can download the workflow here.) I confirmed that the script filter is being run with the correct query and is displaying the correct output (it writes to last_query.txt and last_output.xml in the workflow folder), but it looks like Alfred isn't keeping up and doesn't update the results. Edit: Just to clarify, you can check last_query.txt and last_output.xml in the workflow folder after running it to see what the correct output should have been. This workflow doesn't seem to provide any results at all at character 3 or after, even if I type slowly. Are you sure this isn't something to do with your code? I made a similar workflow using my php class that included a .5 second sleep at the beginning and then added results and it seemed to work just as expected Link to comment Share on other sites More sharing options...
ClintonStrong Posted March 23, 2013 Author Share Posted March 23, 2013 (edited) This workflow doesn't seem to provide any results at all at character 3 or after, even if I type slowly. Are you sure this isn't something to do with your code? I made a similar workflow using my php class that included a .5 second sleep at the beginning and then added results and it seemed to work just as expected Here's a screenshot of the results I get (when I hit multiple keys at the same time): To make sure it wasn't just my workflow, I made it write the query to last_query.txt and the XML output to last_output.xml. Here's the XML output from the command I ran to get that screenshot: <?xml version='1.0'?> <items/> Despite returning XML with no results, Alfred was still showing a result. Edit: There shouldn't be anything special about my workflow. I tried it with David's Faves workflow, and I get the same behavior: I type a query, but Alfred doesn't update its results to reflect that query. Edited March 24, 2013 by Clinton Strong Link to comment Share on other sites More sharing options...
ClintonStrong Posted March 25, 2013 Author Share Posted March 25, 2013 (edited) I did some more testing, and it looks like I misreported the error. When a script filter returns either an empty set of XML results (like what I posted above) or any other output that isn't valid, Alfred continues to show those old results, rather than clearing them. However, if I wait a bit and type another character, Alfred clears the results. I'm not sure if this is intentional or not. If it is, should script filters display an item with a title of "No results found." instead? That gets around the issue, but you don't get the fallback searches like you normally would when no results were found. Edited March 25, 2013 by Clinton Strong Link to comment Share on other sites More sharing options...
Andrew Posted March 27, 2013 Share Posted March 27, 2013 I'll take a bit of a closer look at what is happening here for 2.0.3 to see if I can work out what is going on, cheers for the extra info Link to comment Share on other sites More sharing options...
Andrew Posted April 9, 2013 Share Posted April 9, 2013 I did some more testing, and it looks like I misreported the error. I'm not sure if this is intentional or not. If it is, should script filters display an item with a title of "No results found." instead? That gets around the issue, but you don't get the fallback searches like you normally would when no results were found. Just a quick update to say that from 2.0.3, the fallbacks will show in this scenario as I agree that Alfred should do what he always does when no results are found Link to comment Share on other sites More sharing options...
Vero Posted April 16, 2013 Share Posted April 16, 2013 I'm using v2.0.2 (178) on OS X 10.8.3. Alfred 2.0.3 b184 is now in pre-release from the in-app auto-updater, including improvements for this, so please update to test Link to comment Share on other sites More sharing options...
ClintonStrong Posted April 16, 2013 Author Share Posted April 16, 2013 Alfred 2.0.3 b184 is now in pre-release from the in-app auto-updater, including improvements for this, so please update to test Awesome, seems to be working perfectly so far. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now