alright, I solved it by adding some functions to waveapi. Here is my
patch:
--- waveapi.orig/document.py 2009-08-13 15:42:15.000000000 +0800
+++ waveapi/document.py 2009-09-17 10:00:07.000000000 +0800
@@ -161,6 +161,12 @@
super(FormElement, self).__init__(element_type,
name=name, value=value, default_value=default_value,
label=label)
+ def getName(self):
+ return self.name
+
+ def getValue(self):
+ return self.value
+
class Gadget(Element):
diff -Nu -x '*.pyc' waveapi.orig/model.py waveapi/model.py
--- waveapi.orig/model.py 2009-08-13 15:42:15.000000000 +0800
+++ waveapi/model.py 2009-09-17 09:37:40.000000000 +0800
@@ -268,6 +268,9 @@
"""Returns the raw text content of this document."""
return self._blip.content
+ def GetFormElements(self):
+ return self._blip.elements
+
class Event(object):
"""Data describing a single event."""
On Sep 15, 1:37 pm, jianing yang <[email protected]> wrote:
> Hi,
>
> I am making a robot which needs to read data from robot creating form,
> my code looks like:
>
> def OnFormButtonClicked(properties, context):
> blip = context.GetBlipById(properties['blipId'])
> form = blip.GetDocument().GetFormView()
> button = form.GetFormElement("publish").GetValue()
> logging.debug(button)
>
> After running into this function, I got a error message
> "AttributeError: 'OpBasedDocument' object has no attribute
> 'GetFormView'". It seems that there is no method called GetFormView()
> for document in python client. But seems there is one in Java client
> library. Is there any work around for this problem?
>
> Also, I've read Anthoni's post
> athttp://groups.google.com/group/google-wave-api/browse_frm/thread/b47a...,
> but no one answered that time.
>
> Thanks very much
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---