[Google Wave APIs] Re: how to access sibling of root blip

2009-11-14 Thread Vivek
i could not find the method to access a blip by its id.
 Can you tell me how to do it in java?

--

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-...@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=.




[Google Wave APIs] how to access sibling of root blip

2009-11-12 Thread Vivek
Hai ,

In the robot i'm making, i want to access all the blips that are in
the wavelet even before my robot is added to the wavelet. I cannot
find a suitable method in the API .
I know we can access the root blip directly, but then I could not
figure out how to access its siblings.

Please some one suggest me how can i access the already existing blips
in a wavelet.


-Vivek.

--

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-...@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=.




[Google Wave APIs] Re: how to access sibling of root blip

2009-11-12 Thread Vivek


I tried it. Its giving java.lang.NullPointerException  when im
trying to access the children of root blip.

--

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-...@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=.




[Google Wave APIs] problem with setStyle

2009-11-11 Thread Vivek

I recently started using wave API

I wrote a code for editing the blip submitted by any participant.

 if (e.getType() == EventType.BLIP_SUBMITTED )
  {
  Blip blip = e.getBlip();
  blip.getDocument().setStyle(StyleType.BOLD);

//StyledText styledText = new StyledText(blip.getDocument
().getText().toString());
//styledText.addStyle(StyleType.BOLD);
//   blip.getDocument().replaceStyledText(styledText);

 }
the event is being caught. But the text is not becoming bold. Am I
doing some thing wrong??
First I tried to set style directly. Then tried to replace the text
with a styled text. Bith ways no result :(

Please help!!

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: BLIP_SUBMITTED is not triggered in sandbox

2009-11-10 Thread Vivek

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) pamela...@gmail.com
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 qwigly...@gmail.com 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 qwigly...@gmail.com 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 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
-~--~~~~--~~--~--~---