Thanks Daniel. But from properties, I can only get button value. I
dumped the properties to logger, it looks like

09-16 05:51PM 30.149
{u'blipId': u'b+3gbB4bZk%Bs', u'button': u'publish', u'version': 89}

and it only contains button's value



On Sep 17, 5:08 am, Daniel Faust <[email protected]> wrote:
> def showMenu(doc):
>   doc.AppendElement(document.FormElement('BUTTON', 'subscribe',
> 'Subscribe'))
>   doc.AppendElement(document.FormElement('BUTTON', 'unsubscribe',
> 'Unsubscribe'))
>
> def OnFormButtonClicked(properties, context):
>   button = properties['button']
>   if button == 'subscribe':
>     pass
>   if button == 'unsubscribe':
>     pass
>
> On Sep 16, 11:04 pm, Anthoni <[email protected]> wrote:
>
>
>
> > Hi jjanging,
>
> > I have found a way how to do this now, but unfortunately I do not
> > currently have my code to hand (am changing my OS over to Ubuntu and
> > my python code is backed up)
> > If you want when I get up and running with Ubuntu (hopefully should be
> > tomorrow) I can email you the code that I use ?
>
> > Regards
> > Anthoni
>
> > On Sep 15, 6:37 am, 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to