Have you added your event in the capabilities.xml?
On Wed, Nov 11, 2009 at 4:34 AM, Vivek <[email protected]> wrote:
>
> I just creadted a robot which responds to any new BLIP added by
> responding to BLIP_SUBMITTED event.
> But its not working when I deployed it. Please help me!!
>
> my code is
>
> if (e.getType() == EventType.BLIP_SUBMITTED )
> {
> Blip blip = e.getBlip();
>
> TextView textView = wavelet.appendBlip().getDocument();
>
> textView.append(blip.getCreator()+" has just written \" "+
> blip.getDocument().toString()+" \" "+" \n");
> }
>
> On Nov 4, 4:47 am, "pamela (Google Employee)" <[email protected]>
> wrote:
> > Thanks for adding your app ID to that issue thread. We'll look and see if
> > the problem is back or if there is a new one.
> >
> > - pamela
> >
> >
> >
> > On Wed, Nov 4, 2009 at 2:36 AM, qMax <[email protected]> wrote:
> >
> > > The problem disappeared only for one version/fresh upload.
> >
> > > It does not work in java also (i've studied java to try this)
> >
> > > This does not work:
> > > @Override
> > > public void processEvents(RobotMessageBundle bundle) {
> > > log.fine("processing events ");
> > > for (Event e: bundle.getEvents()) {
> > > if (e.getType() == EventType.BLIP_SUBMITTED) {
> > > log.fine("processing BLIP_SUBMITTED");
> > > }
> > > }
> > > }
> >
> > > On Nov 3, 5:01 pm, qMax <[email protected]> wrote:
> > > > Either my head or everything seems completely broken.
> > > > Using waveapi Revision: 14
> >
> > > > Tested bot:
> > > > def OnEvent(type, properties, context):
> > > > logging.debug("Event %s %s"%(type,properties))
> >
> > > > if __name__ == '__main__':
> > > > from waveapi import robot
> > > > myRobot = robot.Robot('qmax-waving',
> > > > image_url='http://qmax-waving.appspot.com/
> > > > assets/icon.jpg',
> > > > version='6.1')
> >
> > > > myRobot.RegisterHandler(events.BLIP_SUBMITTED, lambda p,c:
> OnEvent
> > > > (events.BLIP_SUBMITTED,p,c))
> > > > myRobot.RegisterHandler(events.WAVELET_BLIP_CREATED, lambda p,c:
> > > > OnEvent(events.WAVELET_BLIP_CREATED,p,c))
> > > > myRobot.RegisterHandler(events.WAVELET_BLIP_REMOVED, lambda p,c:
> > > > OnEvent(events.WAVELET_BLIP_REMOVED,p,c))
> > > > myRobot.RegisterHandler(events.WAVELET_PARTICIPANTS_CHANGED,
> > > > lambda p,c: OnEvent(events.WAVELET_PARTICIPANTS_CHANGED,p,c))
> > > > myRobot.RegisterHandler(events.WAVELET_SELF_ADDED, lambda p,c:
> > > > OnEvent(events.WAVELET_SELF_ADDED,p,c))
> > > > myRobot.RegisterHandler(events.WAVELET_SELF_REMOVED, lambda p,c:
> > > > OnEvent(events.WAVELET_SELF_REMOVED,p,c))
> > > > myRobot.RegisterHandler(events.WAVELET_TIMESTAMP_CHANGED, lambda
> > > > p,c: OnEvent(events.WAVELET_TIMESTAMP_CHANGED,p,c))
> > > > myRobot.RegisterHandler(events.WAVELET_TITLE_CHANGED, lambda p,c:
> > > > OnEvent(events.WAVELET_TITLE_CHANGED,p,c))
> > > > myRobot.RegisterHandler(events.WAVELET_VERSION_CHANGED, lambda
> > > > p,c: OnEvent(events.WAVELET_VERSION_CHANGED,p,c))
> > > > myRobot.RegisterHandler(events.BLIP_CONTRIBUTORS_CHANGED, lambda
> > > > p,c: OnEvent(events.BLIP_CONTRIBUTORS_CHANGED,p,c))
> > > > myRobot.RegisterHandler(events.BLIP_DELETED, lambda p,c: OnEvent
> > > > (events.BLIP_DELETED,p,c))
> > > > myRobot.RegisterHandler(events.BLIP_SUBMITTED, lambda p,c:
> OnEvent
> > > > (events.BLIP_SUBMITTED,p,c))
> > > > myRobot.RegisterHandler(events.BLIP_TIMESTAMP_CHANGED, lambda
> p,c:
> > > > OnEvent(events.BLIP_TIMESTAMP_CHANGED,p,c))
> > > > myRobot.RegisterHandler(events.BLIP_VERSION_CHANGED, lambda p,c:
> > > > OnEvent(events.BLIP_VERSION_CHANGED,p,c))
> > > > myRobot.RegisterHandler(events.DOCUMENT_CHANGED, lambda p,c:
> > > > OnEvent(events.DOCUMENT_CHANGED,p,c))
> > > > myRobot.RegisterHandler(events.FORM_BUTTON_CLICKED , lambda p,c:
> > > > OnEvent(events.FORM_BUTTON_CLICKED,p,c))
> > > > myRobot.Run()
> >
> > > > Testing:
> > > > added bot to wave, created blip, typed text, deleted blip, added
> > > > another robot, removed another robot, removed the bot.
> >
> > > > On wave preview:
> > > > triggered WAVELET_SELF_ADDED, BLIP_SUBMITTED
> >
> > > > On wave sandbox:
> > > > triggered WAVELET_SELF_ADDED
> >
> > > > Nothing else.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---