ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #10363
Re: Scopes questions
On Mon, Nov 3, 2014 at 3:49 PM, Rodney Dawes
<rodney.dawes@xxxxxxxxxxxxx> 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 finding the current delay is not long
enough, please file a bug that the queries are happening too fast.
I'm testing on an emulator, where typing is *really* slow, so I'm not
in any position to judge this empirically. But 100ms is roughly 100
wpm, which is a rather fast clip!
Is this something that could be made a setting in the .ini file? If
you're typing a mathematical expression, as in my case, you're probably
going to be moving significantly slower than if you're typing a buddy's
handle.
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 set up a timeout and only send out the HTTP
request if it doesn't get a cancel() in that time. Any gotchas with
that approach?
2) Is it possible to display images without any rescaling or
cropping?
I don't think so. The card size and aspect ratio you specify in the
scope, tells the dash how to draw the images. To fit properly, the
dash
will scale and may crop, the images.
This is a problem. Some responses will be mathematical formulae. They
can be formatted as MathML or LaTeX, but unless I'm mistaken, the scope
can only display plain text. The server can also respond with these
rendered as images, but these look ugly if a short formula is scaled to
stretch all the way across the screen.
3) How do you get an updated .ini file to be used?
It looks like this was an issue with the older emulator. I've just
updated to rtm v5, and this is no longer a problem.
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 that the results show up in the scope
each time reply->push is called? If so, I could probably get nearly
the same result by making a series of synchronous requests with pushes
in between. Presumably we'd also need to be checking if cancel had
been called anywhere in there.
Thanks for the detailed answers!
Robert
Follow ups
References