I am looking to get a robot to perform the following: When a new blip
is added to a Wave, the robot pre-fills the blip content with some
text (before the user might click the "Done" button).

My example code properly sets up a Robot and fires a handler on
WAVELET_BLIP_CREATED just as I want. Initially, my first thought was
to retrieve the "newBlipId" property and use context.GetBlipById
(...).  Problem is, this appears to return None.  If I retrieve the
other "blipId" property and use GetBlipById, it returns the root blip.

Here's what my code looks like...

from waveapi import events
from waveapi import model
from waveapi import robot

import logging

def OnBlipCreated(properties, context):
  """Invoked when a blip is created"""
  logging.debug(properties)
  blip = context.GetBlipById(properties['newBlipId'])
  blip.GetDocument().SetText("YATTA!")

... (handler and robot boostrap omitted) ...

Does anyone have any suggestions? Is this a limitation of the current
API or am I missing something obvious?

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to