Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Incrementally add text to a blip
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Daniel Rothenberg  
View profile  
 More options Nov 7, 10:14 pm
From: Daniel Rothenberg <counterstry...@gmail.com>
Date: Sat, 7 Nov 2009 19:14:35 -0800 (PST)
Local: Sat, Nov 7 2009 10:14 pm
Subject: Incrementally add text to a blip
Hi,

I'm writing a Robot in Python which, in a nutshell, 'reads' Quiz Bowl
questions in a Wave. At the moment, I have it respond to certain
commands by generating a new Blip and placing the full text of a
question in said Blip. It also appends the answer to the question as
an inline Blip.

However, I'm searching for a way to have the Robot incrementally add
the words of the question to the Blip. The current iteration of my
code can be found at <http://code.google.com/p/quizzy/source/browse/
trunk/quizzy.py>, and you can see how OnBlipSubmitted() calls
AskQuestion(), the method which retrieves a question and 'asks' it.
Now, I've tried using time.sleep() to have the robot wait in between
adding text to the document it's working in, but I've noticed that it
doesn't look like Wave is updating the document until after
OnBlipSubmitted() completely finishes.

Is anyone familiar with a technique I can use to get my robot to
incrementally add the words of the question to the document it's
writing and have the document visibly change with each addition?

Thanks!


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Nesting  
View profile  
 More options Nov 8, 2:19 am
From: David Nesting <da...@fastolfe.net>
Date: Sat, 7 Nov 2009 23:19:28 -0800
Local: Sun, Nov 8 2009 2:19 am
Subject: Re: [Google Wave APIs] Incrementally add text to a blip

On Sat, Nov 7, 2009 at 7:14 PM, Daniel Rothenberg
<counterstry...@gmail.com>wrote:

> adding text to the document it's working in, but I've noticed that it
> doesn't look like Wave is updating the document until after
> OnBlipSubmitted() completely finishes.

Robot events are simply HTTP requests.  The wave server makes an HTTP
request to your robot, provides all of the details of the event in the
request, and your robot returns an HTTP response that contains the
operations your robot wishes to perform in response to that event.  You only
get one set of operations per event, and all of those must be returned and
processed at once.  You can't sleep between incremental updates, because the
incremental updates are all sent as one set of operations, and you're just
delaying when those operations get sent back to the server.

> Is anyone familiar with a technique I can use to get my robot to
> incrementally add the words of the question to the document it's
> writing and have the document visibly change with each addition?

You could use a cron job for this:

http://wave-robot-python-client.googlecode.com/svn/trunk/pydocs/wavea...

I would worry that the timing of this may not be consistent enough at the
rate you're likely to want the blip updated.

David


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Rothenberg  
View profile  
 More options Nov 8, 11:38 am
From: Daniel Rothenberg <counterstry...@gmail.com>
Date: Sun, 8 Nov 2009 08:38:55 -0800 (PST)
Local: Sun, Nov 8 2009 11:38 am
Subject: Re: Incrementally add text to a blip
Thanks, David. I'll play around with the cron job idea, but it looks
like I'll have to compromise and figure out a different behavior for
the robot.

- Daniel

On Nov 8, 2:19 am, David Nesting <da...@fastolfe.net> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bryan Devaney  
View profile  
 More options Nov 18, 11:49 pm
From: Bryan Devaney <bryan.deva...@gmail.com>
Date: Wed, 18 Nov 2009 20:49:52 -0800 (PST)
Local: Wed, Nov 18 2009 11:49 pm
Subject: Re: Incrementally add text to a blip
you could possibly write an extension that took the blip from a
specific bot and display it at the desired speed. though it might be
easier to simply rewrite the bot as an extension in that case however.

On Nov 8, 4:38 pm, Daniel Rothenberg <counterstry...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Olreich  
View profile  
 More options Nov 20, 7:37 am
From: Olreich <olre...@gmail.com>
Date: Fri, 20 Nov 2009 04:37:58 -0800 (PST)
Local: Fri, Nov 20 2009 7:37 am
Subject: Re: Incrementally add text to a blip
If you want to do it with Robots, you may get the functionality soon,
as it looks like the Wave team is building a version of the API where
the Robot can send messages, at least to get context of blips, this
may mean good things for the Robot sending messages and having text
appear incrementally (you might be able to send a message telling wave
to update the blip with your new text).

aus...@wavesandbox.com:
you can perform action to that blip such as appending, etc.  But you
still have no context to its actual content, like if you want to
parse
out any FormElement within the blip.  A new mechanism we are working
is the active gateway API which will allow a robot to make active
request to wave to retrieve full context of any blip.
11:17 am

Also, an alternative method that you might try (though it probably
doesn't work), is to have the robot
On Nov 18, 11:49 pm, Bryan Devaney <bryan.deva...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google