Oh, and in the example link, don't let yourself get irritated because
of the

def OnFormButtonClicked(__event__, context):
  [...]
  button = __event__.properties['button']

just replace it so that it says:

def OnFormButtonClicked(properties, context):
  [...]
  button = properties['button']



On Nov 9, 10:23 pm, Daniel Faust <soundlin...@gmail.com> wrote:
> Take this one as a 
> tutorialhttp://code.google.com/p/wave-projects/source/browse/robots/wave-xmpp...
>
> On Nov 9, 6:28 am, Bernardo Amorim <bamor...@gmail.com> wrote:
>
> > I just cant get it work, here's my code:
>
> > Main class:
> > if __name__ == '__main__':
> >   myRobot = robot.Robot('APP-NAME',
> >       image_url='http://APP-NAME.appspot.com/icon.png',
> >       version='1',
> >       profile_url='http://APP-NAME.appspot.com/')
> >   myRobot.RegisterHandler(events.WAVELET_PARTICIPANTS_CHANGED,
> > OnParticipantsChanged)
> >   myRobot.RegisterHandler(events.WAVELET_SELF_ADDED, OnRobotAdded)
> >   myRobot.RegisterHandler(events.FORM_BUTTON_CLICKED,
> > OnFormButtonClicked)
> >   myRobot.Run()
>
> > OnFormButtonClicked function
> > def OnFormButtonClicked(properties, context):
> >   root_wavelet = context.GetRootWavelet()
> >   root_wavelet.CreateBlip().GetDocument().SetText("I'm alive!")
>
> > OnRobotAdded function
> > def OnRobotAdded(properties, context):
> >   root_blip = context.GetBlipById(context.GetRootWavelet
> > ().GetRootBlipId())
> >   doc = root_blip.GetDocument()
> >   doc.AppendElement(document.FormElement(document.ELEMENT_TYPE.BUTTON,
> > 'btn_Submit', 'Submits'))
>
> > No blips are being created, where i'm doing it wrong? The Button is
> > added, but it just does nothing.
>
> > Thanks you in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Wave API" group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to