[Google Wave APIs] Re: Incrementally add text to a blip

2009-11-08 Thread Daniel Rothenberg

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:
 On Sat, Nov 7, 2009 at 7:14 PM, Daniel Rothenberg
 counterstry...@gmail.comwrote:

  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
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Wave API group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: How to maintain the gadget state when the blip containing the gadget is resized?

2009-11-08 Thread Vikram

1. I have developed this gadget.
2. Yes it is wave specific gadget.
3. Yes I have pretty good knowledge of wave states.
4. No I am talking about auto resizing.

Actually every time the blip containing the gadget reloads, the SWF
goes back to its initial gadget,

Whenever you resize invariably the gadget reloads leading to the SWF
going back to its original state. Is there a way to make the wave
server cache the gadget state so that it doesn't reload again and
again?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Wave API group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: How to maintain the gadget state when the blip containing the gadget is resized?

2009-11-08 Thread Vikram

1. I have developed this gadget.
2. Yes it is wave specific gadget.
3. Yes I have pretty good knowledge of wave states.
4. No I am not talking about auto resizing.

Actually every time the blip containing the gadget reloads, the SWF
goes back to its initial gadget,

Whenever you resize invariably the gadget reloads leading to the SWF
going back to its original state. Is there a way to make the wave
server cache the gadget state so that it doesn't reload again and
again?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Wave API group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: Serving a dynamic gadget from the robot app

2009-11-08 Thread pamela (Google Employee)
I believe the IMDBotty sample does something like that, using the Python SDK
and Django templates:
http://wave-samples-gallery.appspot.com/about_app?app_id=48018

- pamela

On Sun, Nov 8, 2009 at 6:05 PM, David Nesting da...@fastolfe.net wrote:

 This seems pretty straightforward to do within appengine.  Rather than
 serve a static XML document from a static_dir or static_files handler, serve
 it from a script.  The script could accept query or path parameters to
 customize the XML it emits.  If you need details, what language are you
 working in?

 David

 On Sat, Nov 7, 2009 at 6:44 AM, Flavio Coelho fccoe...@gmail.com wrote:


 Hi I want to serve a gadget which I modify according to data collected
 by the robot. So I want to generate the gadget XML dynamically and
 serve at using the same app for example at myrobot.appspot.com/gadget/

 I haven't figured out how to do this.

 any ideas?




 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Wave API group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: Google Calendar?

2009-11-08 Thread Carl

If not a google calendar, than a calendar that is part of the wave, to
which people can do... something?

Ideas:
Mark available/not available/maybe days by a 3-state toggle on click.
Fill in events by click, then simple form for title, location, time
Make the produced calendar output an ical or other kind of
subscribable feed that we can connect to google calendar.

On Nov 7, 4:20 pm, OneRyt one@gmail.com wrote:
 It seems almost a no brainer to add a google calendar application/bot
 to google wave... if it's such a collaborative tool, dates and
 appointment invitations etc. are of paramount importance to be tied
 into it.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Wave API group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~--~~~~--~~--~--~---



[Google Wave APIs] Cron Tutorial

2009-11-08 Thread Smola

I know what a cron job is, I have just never created one.  For ANY
platform.  Google Wave is a very specific platform and there isn't
much documentation on it (crons with Wave).  In the Java API tutorial,
cron jobs are mentioned as being available, but that's all I could
find on them.  I have seen some other posts about cron jobs in groups
here and gathered that some lines of code should be added to the
capabilities.xml but I don't know the extent of the attributes I can
use or even how to use the ones I saw in the post (i think there was a
directory for a script? and then a time given that appeared to be an
interval like every 10 seconds).

So my question is this:  Is there some documentation I have missed in
terms of cron jobs with wave (for the Java API)?  If not, could
someone give a quick run down of their understanding of how this could
be used?

I am also aware that a mechanism is being developed that could replace
the need for cron jobs but I'd still like to familiarize myself with
the cron capabilities.  Thanks for your time!

Smola
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Wave API group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: No enum const class com.google.wave.api.EventType.OPERATION_ERROR

2009-11-08 Thread Austin Chau (Google employee)
Since I don't have the full context of your code, I am suspecting that your
outputSream.toString() is returning content that is unserializable to the
client library.  Keep in mind that appendMarkup() can only handle i,
strong, em, b.

Austin

On Sat, Nov 7, 2009 at 11:49 AM, Piotr Pejas piotr.pe...@gmail.com wrote:


 Hi  everybody,
 I am new to group and wave.

 I wrote simple robot which listen to blip changes and append some html
 if blip text match my regular expression and I get an exception when I
 call appendMarkup on TextView, append method works but escapes html
 and it's not what I need.
 Am I doing something wrong or is it a bug?

 My code:
 transformer.transform(xml, result);
 textView.appendMarkup(outputStream.toString());

 and exception:
 /_wave/robot/jsonrpc
 java.lang.IllegalArgumentException: No enum const class
 com.google.wave.api.EventType.OPERATION_ERROR
at java.lang.Enum.valueOf(Unknown Source)
at com.google.wave.api.EventType.valueOf(EventType.java:24)
at com.google.wave.api.impl.EventDataSerializer.unmarshall
 (EventDataSerializer.java:94)
at com.metaparadigm.jsonrpc.JSONSerializer.unmarshall
 (JSONSerializer.java:202)
at com.metaparadigm.jsonrpc.ListSerializer.unmarshall
 (ListSerializer.java:101)
at com.metaparadigm.jsonrpc.JSONSerializer.unmarshall
 (JSONSerializer.java:202)
at com.google.wave.api.impl.EventMessageBundleSerializer.unmarshall
 (EventMessageBundleSerializer.java:87)
at com.metaparadigm.jsonrpc.JSONSerializer.unmarshall
 (JSONSerializer.java:202)
at com.google.wave.api.AbstractRobotServlet.deserializeEvents
 (AbstractRobotServlet.java:158)
at com.google.wave.api.AbstractRobotServlet.doPost
 (AbstractRobotServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1093)
at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
 (SaveSessionFilter.java:35)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
at
 com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
 (TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle
 (ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle
 (SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
 (SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
 (ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
 405)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
 (AppVersionHandlerMap.java:238)
at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 506)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
 (HttpConnection.java:830)
at
 com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
 (RpcRequestParser.java:76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at

 com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest
 (JettyServletEngineAdapter.java:139)
at com.google.apphosting.runtime.JavaRuntime.handleRequest
 (JavaRuntime.java:239)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
 $6.handleBlockingRequest(RuntimePb.java:5135)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
 $6.handleBlockingRequest(RuntimePb.java:5133)
at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
 (BlockingApplicationHandler.java:24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
 363)
at com.google.net.rpc.impl.Server$2.run(Server.java:814)
at com.google.tracing.LocalTraceSpanRunnable.run
 (LocalTraceSpanRunnable.java:56)
at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
 (LocalTraceSpanBuilder.java:516)
at com.google.net.rpc.impl.Server.startRpc(Server.java:769)
at com.google.net.rpc.impl.Server.processRequest(Server.java:351)
at com.google.net.rpc.impl.ServerConnection.messageReceived
 (ServerConnection.java:437)
at com.google.net.rpc.impl.RpcConnection.parseMessages
 (RpcConnection.java:319)
at com.google.net.rpc.impl.RpcConnection.dataReceived
 (RpcConnection.java:290)
at com.google.net.async.Connection.handleReadEvent(Connection.java:
 436)
at 

[Google Wave APIs] Re: Cron Tutorial

2009-11-08 Thread Austin Chau (Google employee)
We do not have documentation for the current cron setup for robot, due the
reason you have mentioned that we are soon replacing it with a more robust
mechanism.  In the meanwhile, please check out the sample robot Stocky which
uses the current cron setup -

http://google-wave-resources.googlecode.com/svn/trunk/samples/extensions/robots/java/stocky/

http://google-wave-resources.googlecode.com/svn/trunk/samples/extensions/robots/java/stocky/Essentially
you specify your cron spec in the capabilities.xml.  Map a handler to the
URL in web.xml -

url-pattern/_wave/robot/fetchupdate/url-pattern

Austin

On Sun, Nov 8, 2009 at 5:40 PM, Smola callmesm...@gmail.com wrote:


 I know what a cron job is, I have just never created one.  For ANY
 platform.  Google Wave is a very specific platform and there isn't
 much documentation on it (crons with Wave).  In the Java API tutorial,
 cron jobs are mentioned as being available, but that's all I could
 find on them.  I have seen some other posts about cron jobs in groups
 here and gathered that some lines of code should be added to the
 capabilities.xml but I don't know the extent of the attributes I can
 use or even how to use the ones I saw in the post (i think there was a
 directory for a script? and then a time given that appeared to be an
 interval like every 10 seconds).

 So my question is this:  Is there some documentation I have missed in
 terms of cron jobs with wave (for the Java API)?  If not, could
 someone give a quick run down of their understanding of how this could
 be used?

 I am also aware that a mechanism is being developed that could replace
 the need for cron jobs but I'd still like to familiarize myself with
 the cron capabilities.  Thanks for your time!

 Smola
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Wave API group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: How to display an image button...

2009-11-08 Thread Austin Chau (Google employee)
Image button is not available, you can only have the typical gray button for
it to be clickable.  Feel free to file a feature request for it.

Austin

On Sun, Nov 8, 2009 at 7:50 AM, Venkat Polisetti venkat.polise...@gmail.com
 wrote:


 Hi All,

textView.appendElement(new FormElement(ElementType.BUTTON,
 my_button, Submit));

 Thanks,
 Venkat


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Wave API group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: Embedding Waves in Blogs and Search Engines

2009-11-08 Thread Lee

This is purely guesswork but given that waves are extensively client-
side driven, and that the current push model can not physically push
contents onto static resource (IE: stream/poll aren't natively
implemented), it's most likely going to be a no (unless the crawlers
can parse javascript). However, it's possible to poll the resources on
the serverside and render it in a indexable, non-realtime fashion to
the client, however that defeats the purpose of wave.

Of course, my knowledge is limited so it might be better for one of
the brilliant google employee to delve further into this problem. I
don't know, Google's been known to come up with solutions to ideas
traditionally thought to be impossible to implement (taking wave for
example)

On Nov 7, 6:30 pm, Danny Tuppeny m...@dantup.me.uk wrote:
 Apologies if this has been asked before, but I can't find any info on
 it...

 Embedding waves in a blog looked pretty cool, but my impression (based
 on nothing but the video of the I/O demo) is that it's all Javascript-
 based. This makes me wonder whether Search Engines would be able to
 read any content embedded in a blog this way? Is there a server-side
 embed API that would allow the current wave to be output in a way
 search engines can index it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Wave API group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: How to maintain the gadget state when the blip containing the gadget is resized?

2009-11-08 Thread Lee

It would seem more appropriate for the SWF object to cache its own
state after each change made to it and to revert to the most recent
state after each refresh.

On Nov 8, 11:05 am, Vikram vikram.prav...@gmail.com wrote:
 1. I have developed this gadget.
 2. Yes it is wave specific gadget.
 3. Yes I have pretty good knowledge of wave states.
 4. No I am not talking about auto resizing.

 Actually every time the blip containing the gadget reloads, the SWF
 goes back to its initial gadget,

 Whenever you resize invariably the gadget reloads leading to the SWF
 going back to its original state. Is there a way to make the wave
 server cache the gadget state so that it doesn't reload again and
 again?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Wave API group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: [simple?] connect my googlegroups to googlewave

2009-11-08 Thread Lee

this is just out of curiosity but surely the latter part of what David
suggested couldn't be more complicated then an RSS parser

On Nov 7, 11:30 pm, Prashant antsh...@gmail.com wrote:
 just add your grp address (your-...@googlegroups.com) to the wave but
 presently that works for sanbox accounts only.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Wave API group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~--~~~~--~~--~--~---



[Google Wave APIs] how to determine if gadget viewer is gadget installer ?

2009-11-08 Thread qMax

Hi.
I want to provide different controls in depend on who is controlling
gadget.
Is there a way to determine if current viewer as returned by
wave.getViewer() is one who installed gadget ?

There's no INSTALL mode
What mode gadget have when it is first time inserted?

Oh!
I guess i can check gadget state and if it is empty that means it is
newly installed gadget, and then catch viewer and store viwerId in
gadget itself as a moderator/installator.

Thanks for the answer :)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Wave API group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~--~~~~--~~--~--~---



[Google Wave APIs] Just can't get FORM_BUTTON_ADDED work (Python)

2009-11-08 Thread Bernardo Amorim

I just cant get it work, here's my code:

Main class:
if __name__ == '__main__':
  myRobot = robot.Robot('APP-NAME',
  image_url='http://APP-NAME.appspot.com/icon.png',
  version='1',
  profile_url='http://APP-NAME.appspot.com/')
  myRobot.RegisterHandler(events.WAVELET_PARTICIPANTS_CHANGED,
OnParticipantsChanged)
  myRobot.RegisterHandler(events.WAVELET_SELF_ADDED, OnRobotAdded)
  myRobot.RegisterHandler(events.FORM_BUTTON_CLICKED,
OnFormButtonClicked)
  myRobot.Run()

OnFormButtonClicked function
def OnFormButtonClicked(properties, context):
  root_wavelet = context.GetRootWavelet()
  root_wavelet.CreateBlip().GetDocument().SetText(I'm alive!)

OnRobotAdded function
def OnRobotAdded(properties, context):
  root_blip = context.GetBlipById(context.GetRootWavelet
().GetRootBlipId())
  doc = root_blip.GetDocument()
  doc.AppendElement(document.FormElement(document.ELEMENT_TYPE.BUTTON,
'btn_Submit', 'Submits'))

No blips are being created, where i'm doing it wrong? The Button is
added, but it just does nothing.

Thanks you in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Wave API group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: How to maintain the gadget state when the blip containing the gadget is resized?

2009-11-08 Thread pamela (Google Employee)
Your gadget is likely suffering from a known issue:
http://code.google.com/p/google-wave-resources/issues/detail?id=320
Due to a old bug in Firefox, a SWF inside a gadget is reloaded each time the
Wave panel resizes.
There are some workarounds suggested for avoiding this issue, and we're
looking into them.

In the meantime, please try to minimize the loading time of your SWF and
ensure that you are storing the absolute state in the Gadget state.

- pamela

On Mon, Nov 9, 2009 at 3:21 PM, Lee leeyuan...@gmail.com wrote:


 It would seem more appropriate for the SWF object to cache its own
 state after each change made to it and to revert to the most recent
 state after each refresh.

 On Nov 8, 11:05 am, Vikram vikram.prav...@gmail.com wrote:
  1. I have developed this gadget.
  2. Yes it is wave specific gadget.
  3. Yes I have pretty good knowledge of wave states.
  4. No I am not talking about auto resizing.
 
  Actually every time the blip containing the gadget reloads, the SWF
  goes back to its initial gadget,
 
  Whenever you resize invariably the gadget reloads leading to the SWF
  going back to its original state. Is there a way to make the wave
  server cache the gadget state so that it doesn't reload again and
  again?
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Wave API group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~--~~~~--~~--~--~---