Thanks for your reply, Lee. I've been working on and off over the last
couple of days and I think I'm stuck.
The code I'm using can be found here --
http://code.google.com/p/googlewaverobots/source/browse/trunk/robottestwave/robottestwave.py
and the gadget is found here
http://code.google.com/p/googlewaverobots/source/browse/trunk/robottestwave/public/dropdown.xml
(I decided to try to replicate the translation robot, as it seemed
like it'd teach me a good amount about python and the APIs)
Anyway, the problem I'm having is that I can't get the robot, when a
new blip is submitted, to read the state of the gadget, but when I
modify the languages in the dropdown options it gets them fine. I
think the problem is in how I search for the gadget, as when I modify
the state of the gadget it works well, but if I don't it doesn't find
the gadget.
I searched the groups and can't find a way of doing this that works
for me. I tried making global variables so that when the gadget is
modified the language pairs would likewise be modified. I made two
variables fr and to (language from which and to which we're
translating) and in the onBlipSubmitted I did a global fr and global
to and tried modifying them in the gadget key, elem gadget loop but to
no avail -- I got no errors, but it wouldn't modify the values for me.
You can also see what I've tried on the previous revisions of the
code. If I set a default value for the global variables I can't change
it, and if I don't set anything it says that the global name is not
defined.
Any help is very much appreciated.
Cheers.
On Nov 5, 12:52 am, Lee <
leeyuan...@gmail.com> wrote:
> Looking at the API, the following python object will allow you to
> create a local UI on the client browser
>
> waveapi.document.Gadget(resource)
>
> And
>
> blip.GetDocument().AppendElement(Element*)
>
> Subclassed instances of Element are also allowed, so you can initiate
> a document.Gadget object
>
> The wave environment already provides an interface for the host
> application (more info athttp://
code.google.com/apis/wave/extensions/gadgets/guide.html),