As far as I know, it is currently impossible for a robot to modify a gadget. What we do now is delete the gadget and add it back. I have brought this up with the Googlers and as far as I know it is somewhere in their pipeline.
-- http://thewe.net On Sun, Sep 27, 2009 at 8:20 PM, Gijsbert <[email protected]>wrote: > > Nobody else has this problem? > > I just realized that the post title is a bit messed up, the problem: > doc.GadgetSubmitDelta() only works for me if I create the target > gadget in the same robot action. When I try to update parameters to an > existing gadget the new value does not get stored. > > Cheers. > > On Sep 23, 6:56 pm, Gijsbert <[email protected]> wrote: > > Hi, > > > > I have a robot that extracts any image (jpg) urls from the blip and > > creates my gadget and submits a delta with all the urls. It works if > > the blip did not have the gadget, but it does not update the imgurls > > state if the gadget is already part of the blip. The robot logging > > shows a 'CONSTRUCTING gadget' msg with the right new urls, and an > > 'Outgoing: ...' as well, but my gadget state callback does not get > > called with the new value. Even when I reload the wave I will get the > > old urls. > > > > This is the code: > > > > def OnBlipSubmitted(properties, context): > > blip = context.GetBlipById(properties['blipId']) > > doc = blip.GetDocument() > > imgurlre = re.compile('(http://\S*.jpg)') > > m = imgurlre.findall(doc.GetText()) > > if m: > > mygadget = blip.GetGadgetByUrl(GADGET_URL) > > if not mygadget: > > mygadget = document.Gadget(GADGET_URL) > > doc.AppendElement(mygadget) > > doc.GadgetSubmitDelta(mygadget, {'imgurls':'\n'.join(m)}) > > > > Am I doing something wrong or is this a bug? > > > > Thanks, > > Gijsbert > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en -~----------~----~----~----~------~----~------~--~---
