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 <[email protected]> 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),
> the following might help
>
> The gadget will contain a list that automatically invokes wave.getState
> ().submitDelta(dict); everytime the change event occurs on the list
> (you can do this via jQuery) and the result is sent back to the
> application, which does what it needs off of the information.
>
> On 4 Nov, 17:14, Niall <[email protected]> wrote:
>
>
>
> > Thanks for your reply, Lee.
> > I don't think the code for aunt-rosie is available (aunt-
> > [email protected] to use it, and the developer's website is 
> > herehttp://andrewhitchcock.org/?post=322)
>
> > I think I know what I have to do, though. I was looking at the row of
> > four source code, so I think I have to make a bit of a module like
> > what it's got herehttp://rowoffour.appspot.com/gadget.xml
> > I'll go play around with this for a while and report back with
> > successes and failures.
>
> > On Nov 4, 10:39 pm, Lee <[email protected]> wrote:
>
> > > The beauty of API design, and this is especially true of Google
> > > projects, is that the binding exposes the same sets of methods and
> > > objects for every language that it supports, so in theory it should be
> > > relatively easy to port specific portions of the app across different
> > > languages (all you need is a the most rudimentary amount of knowledge
> > > about the syntax of Java).
>
> > > If you can provide the link to download for the aunt-rosie robot, I
> > > can help you locate and port the code to python. (Although it may be
> > > in the API document, make sure that you check there first).
>
> > > On 4 Nov, 08:42, Niall <[email protected]> wrote:
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to