Re: [Ubuntu-phone] Scopes questions

2014-11-19 Thread Robert Schroll
On Mon, Nov 3, 2014 at 11:11 PM, Michi Henning wrote: On Mon, Nov 3, 2014 at 4:50 PM, Rodney Dawes wrote: I do think 100ms is probably to fast, personally. 300ms would be much better, and on par with average users. I'm happy to file a bug about this, if you can tell me which project to

Re: [Ubuntu-phone] Scopes questions

2014-11-03 Thread Michi Henning
On 4 Nov 2014, at 13:19 , Robert Schroll wrote: > Thanks, all, for the helpful explanations. I think I'm finally starting to > grok what's going on with scopes. I need some time to digest everything > you've told me, but I'll be back with more questions soon. > > One comment: There seems to

Re: [Ubuntu-phone] Scopes questions

2014-11-03 Thread Robert Schroll
Thanks, all, for the helpful explanations. I think I'm finally starting to grok what's going on with scopes. I need some time to digest everything you've told me, but I'll be back with more questions soon. One comment: There seems to be several reasons to prefer asynchronous behavior, but t

Re: [Ubuntu-phone] Scopes questions

2014-11-03 Thread Tal Zion
I haven't written a scope yet but I have implemented what you described in bullet point 1 in my app. Here is my RequestManager class which delays requests as you described. It is pretty simple and

Re: [Ubuntu-phone] Scopes questions

2014-11-03 Thread Rodney Dawes
On Mon, 2014-11-03 at 16:29 -0500, Robert Schroll wrote: > On Mon, Nov 3, 2014 at 3:49 PM, Rodney Dawes > wrote: > > There should be a short delay (~100ms) already, after the last key was > > pressed, before the query is sent. Maybe this needs to be closer to > > 300ms or so, as typing on the pho

Re: [Ubuntu-phone] Scopes questions

2014-11-03 Thread Thomas Strehl
On 11/03/2014 10:29 PM, Robert Schroll wrote: > >> However, when a new query is sent to the scope, the old query has >> cancel() called on it. You may need to add additional code to close the >> connection to the server, or similar, when you receive the cancel call. > > Presumably a scope could

Re: [Ubuntu-phone] Scopes questions

2014-11-03 Thread Michi Henning
> >> It is basically up to the developer of the scope to decide how to do >> that. You will need to block in the Query::run, hold the reference to >> the Reply pointer, and manage asynchronous calls in the background, via >> additional threads or event loops. > > Am I correct in understanding tha

Re: [Ubuntu-phone] Scopes questions

2014-11-03 Thread Robert Schroll
On Mon, Nov 3, 2014 at 3:49 PM, Rodney Dawes wrote: There should be a short delay (~100ms) already, after the last key was pressed, before the query is sent. Maybe this needs to be closer to 300ms or so, as typing on the phone can be pretty slow, unlike typing with a real keyboard. If you are fi

Re: [Ubuntu-phone] Scopes questions

2014-11-03 Thread Rodney Dawes
On Mon, 2014-11-03 at 14:55 -0500, Robert Schroll wrote: > Hi all, > > I started playing around with scopes and have run into a few questions. > If there's a better place to ask about this, please let me know. > Otherwise: > > 1) Is it possible to delay a query until the user hits "Enter"? O

[Ubuntu-phone] Scopes questions

2014-11-03 Thread Robert Schroll
Hi all, I started playing around with scopes and have run into a few questions. If there's a better place to ask about this, please let me know. Otherwise: 1) Is it possible to delay a query until the user hits "Enter"? Or failing that, until a second or so has passed from the last key str