[Google Wave APIs] Re: Modify Profile image programmatically

2009-11-10 Thread Vikram Dhillon

I think a gadget should allow this functionality but I am not sure if
this can be done with having the user authenticate again into their
account. Please correct me if I am right.

-- 
Regards,
Vikram

On Mon, Nov 9, 2009 at 7:28 PM, Sebastien Plisson
 wrote:
>
> Hello,
>
> How can I modify a user profile image through an API ?
>
> from a robot or an extension ?
>
> Thank you
>
> Sebastien
>
> >

--~--~-~--~~~---~--~~
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: multiple gadgets sharing state

2009-11-10 Thread Vikram Dhillon

Hi,
   This could be possible, use a static variable
to keep the track of the state and then since there's only one copy of
that variable, it can accessed at any point in the program/robot :)

-- 
Regards,
Vikram

On Tue, Nov 10, 2009 at 1:37 PM, Austin Chau (Google employee)
 wrote:
> No gadget states are specific to each gadget and not shared among other
> gadgets within the same wave.
>
> There are several ways to maintain "state" among different gadgets of the
> same wave, you can maintained your own persistent storage on remote server
> and use some crossdomain mechanism (jsonp, script injection, etc) to share
> data.  You can also use wave robot to maintain data for you and store them
> on the wave data document.
>
> Austin
>
> On Tue, Nov 10, 2009 at 10:00 AM, rgibson 
> wrote:
>>
>> I would like to share state between multiple gadgets.  When I read the
>> wave gadgets tutorial, it sounded as if the state was stored at the
>> Wave level.  (E.g., call wave.getState() to get the state, gadgets
>> "share state", etc.)  So there would be one "count" per Wave, not one
>> "count" per gadget.
>>
>> Of course, this introduces its own problems (e.g., every gadget
>> developer has to know about the namespace of every other gadget.)  And
>> a quick check shows that if you run two examples of the "count"
>> example gadget, they each have their own "count" variable that updates
>> independently.
>>
>> So is there a way for two gadgets in a Wave to share their state?  Or,
>> what's the best way to do this?
>>
>> I am new at this and trying to poke my way through the documents, but
>> I've gotten to the point where it's better to ask.
>>
>> Thanks,
>> Rob
>>
>
>
> >

--~--~-~--~~~---~--~~
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: State callback function is called multiple times when there is more than one key-value pair in the delta object

2009-11-10 Thread Vikram Dhillon

Alright sorry for replying late, I looked at the API guide, and the callback 
constructor and the getkeys() method are both types of arrays, so I think that 
some where in your program you might have another variable processing parts of 
the array: it might go through some elements of the array whenever each element 
is being processed it calls the constructor to create a new key-value pairs. 
Thus are multiple key-value pairs. Please feel free to correct me if I am wrong.

--
Regards,
Vikram

On Tue, Nov 10, 2009 at 1:28 AM, Vikram  wrote:


Here is the documentation of all the APIs:

http://code.google.com/apis/wave/extensions/gadgets/reference.html
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



signature.asc
Description: OpenPGP digital signature


[Google Wave APIs] Re: State callback function is called multiple times when there is more than one key-value pair in the delta object

2009-11-10 Thread Vikram Dhillon

Alright sorry for replying late, I looked at the API guide, and the callback 
constructor and the getkeys() method are both types of arrays, so I think that 
some where in your program you might have another variable processing parts of 
the array: it might go through some elements of the array whenever each element 
is being processed it calls the constructor to create a new key-value pairs. 
Thus are multiple key-value pairs. Please feel free to correct me if I am wrong.

--
Regards,
Vikram

On Tue, Nov 10, 2009 at 1:28 AM, Vikram  wrote:


Here is the documentation of all the APIs:

http://code.google.com/apis/wave/extensions/gadgets/reference.html
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



signature.asc
Description: OpenPGP digital signature


[Google Wave APIs] Re: Unable to register event handlers for all events except WaveletSelfAdded

2009-11-10 Thread Sri

Hi Pam,

Yes I've tried incrementing the version. The URL for the robot is:
http://arthabot.appspot.com/

- Sri

On Nov 10, 1:48 am, "pamela (Google Employee)" 
wrote:
> Hi Sri-
>
> Did you try deploying your app to a new app identifier? Did you try
> incrementing the version of your Robot?
> What is the URL of the robot?
>
> - pamela
>
> On Fri, Nov 6, 2009 at 3:12 AM, Sri  wrote:
>
> > Hi,
>
> > For some reason, I am unable to set handlers for all events except the
> > WaveletselfAdded event. Here's the code:
> > ---
> > import logging
> > import re
>
> > from waveapi import events
> > from waveapi import model
> > from waveapi import robot
> > from waveapi import document
> > from waveapi import ops
> > from waveapi import util
> > from waveapi import simplejson
>
> > def OnWaveletBlipCreated(properties, context):
> >        logging.debug("OnWaveletBlipCreated")
>
> > def OnWaveletBlipRemoved(properties, context):
> >        logging.debug("OnWaveletBlipRemoved")
>
> > def OnWaveletParticipantsChanged(properties, context):
> >        logging.debug("OnWaveletParticipantsChanged")
>
> > def OnWaveletSelfAdded(properties, context):
> >        logging.debug("OnWaveletSelfAdded")
>
> > def OnWaveletSelfRemoved(properties, context):
> >        logging.debug("OnWaveletSelfRemoved")
>
> > def OnWaveletTimestampChanged(properties, context):
> >        logging.debug("OnWaveletTimestampChanged")
>
> > def OnWaveletTitleChanged(properties, context):
> >        logging.debug("OnWaveletTitleChanged")
>
> > def OnWaveletVersionChanged(properties, context):
> >        logging.debug("OnWaveletVersionChanged")
>
> > def OnBlipContributorsChanged(properties, context):
> >        logging.debug("OnBlipContributorsChanged")
>
> > def OnBlipDeleted(properties, context):
> >        logging.debug("OnBlipDeleted")
>
> > def OnBlipSubmitted(properties, context):
> >        logging.debug("OnBlipSubmitted")
>
> > def OnBlipTimestampChanged(properties, context):
> >        logging.debug("OnBlipTimestampChanged")
>
> > def OnBlipVersionChanged(properties, context):
> >        logging.debug("OnBlipVersionChanged")
>
> > def OnDocumentChanged(properties, context):
> >        logging.debug("OnDocumentChanged")
>
> > def OnFormButtonClicked(properties, context):
> >        logging.debug("OnFormButtonClicked")
>
> > if __name__ == '__main__':
> >        my_robot = robot.Robot('...',
> >                image_url='...',
> >                version='...',
> >                profile_url='...')
> >        my_robot.RegisterHandler(events.WAVELET_BLIP_CREATED,
> > OnWaveletBlipCreated)
> >        my_robot.RegisterHandler(events.WAVELET_BLIP_REMOVED,
> > OnWaveletBlipRemoved)
> >        my_robot.RegisterHandler(events.WAVELET_PARTICIPANTS_CHANGED,
> > OnWaveletParticipantsChanged)
> >        my_robot.RegisterHandler(events.WAVELET_SELF_ADDED,
> > OnWaveletSelfAdded)
> >        my_robot.RegisterHandler(events.WAVELET_SELF_REMOVED,
> > OnWaveletSelfRemoved)
> >        my_robot.RegisterHandler(events.WAVELET_TIMESTAMP_CHANGED,
> > OnWaveletTimestampChanged)
> >        my_robot.RegisterHandler(events.WAVELET_TITLE_CHANGED,
> > OnWaveletTitleChanged)
> >        my_robot.RegisterHandler(events.WAVELET_VERSION_CHANGED,
> > OnWaveletVersionChanged)
> >        my_robot.RegisterHandler(events.BLIP_CONTRIBUTORS_CHANGED,
> > OnBlipContributorsChanged)
> >        my_robot.RegisterHandler(events.BLIP_DELETED, OnBlipDeleted)
> >        my_robot.RegisterHandler(events.BLIP_SUBMITTED, OnBlipSubmitted)
> >        my_robot.RegisterHandler(events.BLIP_TIMESTAMP_CHANGED,
> > OnBlipTimestampChanged)
> >        my_robot.RegisterHandler(events.BLIP_VERSION_CHANGED,
> > OnBlipVersionChanged)
> >        my_robot.RegisterHandler(events.DOCUMENT_CHANGED, OnDocumentChanged)
> >        my_robot.RegisterHandler(events.FORM_BUTTON_CLICKED,
> > OnFormButtonClicked)
> >        my_robot.Run()
> > ---
>
> > I am completely out of ideas, I have spent 1 entire day on this. :-)
>
> > Thanks,
> > Sri
--~--~-~--~~~---~--~~
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)" 
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  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  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
-~--~~~~--~~--~--~---



[Google Wave APIs] Network latency

2009-11-10 Thread Chris Casey

Is there any application I'm missing in either the gadget or robot
APIs which would allow me to measure the network latency between two
current users in a wave? I'm trying to create a gadget which uses
state changes for graphical avatars to interact in real time (mostly
as a proof of concept), but it's almost impossible to sync two systems
without the ability to measure "lag time."

At worst the gadget could do a simple "ping-pong-ping" at regular
intervals, but I'd hate to reinvent the wheel if there's something
more elegant built into the APIs that I'm not seeing.

--~--~-~--~~~---~--~~
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] Project-presentation: SynBioWave

2009-11-10 Thread Paul Staab

Hi everybody,

as we successfully participated in a big biological student
competition called iGEM at the famous MIT last week by creating a
software project based on Wave, we want to take the opportunity to
both thank the Wave-developers for creating Wave and making our
project possible (THANK YOU!) and to give you a short presentation of
what we did, as some of the things we created might be interesting for
other projects as well.

Our Idea basically was to create robots adding molecular biological
functionality to Wave, and therefore allow biologist to plan their
experiments collaboratively online.
As there are LOTS of such functions biologist want to have, we planed
our project to be easy to extend. Therefore we created a main robot
(synbiow...@appspot.com) and an extended abstract robot class other
developers can use to create their own (synbiowave)robots, which
extend the functionality offered in a wave when added to it.
To allow users to call all that functions easily easily, we
additionally created a toolbar-gadget, to which robots register their
functions when added to the Wave (that is some of the stuff down by
the main robot and the extended abstract class). If you want to test
how it works add documentationro...@appspot.com to the wave (after you
added the main robot). The Toolbar should display a new Documentation-
dropdown after that.

Let me know if some of you like to use that dynamical toolbar in your
own projects (i think i read some post requesting such a thing here
before), we can separately release it after some cleanup (of cause you
are free to extract it from our svn at sourceforge yourself as all is
open source...).

Additionally we created a file upload to and download from robots
(what took us quite a while, think that could be interesting for
others as well) and of course lots of biological stuff.

At the moment all robots are written in java, we a planning to create
a extended python abstract robot class later...

If you like to read more (we did a lot of documentation for the
competition) please visit
SynBioWave.org or http://sourceforge.net/projects/synbiowave


Thanks for reading all thought this.
We are always looking for feedback, feel free to answer :-)

David, Jörg and Paul
University of Freiburg, Germany

--~--~-~--~~~---~--~~
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: Google Wave Data API

2009-11-10 Thread Mark Gallop
Sure but how much time will Oliver waste collapsing/deleting ;-) Now  
if it "sensed" the relevance of the response - that would be progress.

Mark

On 10/11/2009, at 11:04 AM, pamela (Google Employee) wrote:

> This is the nature of forums. Once the whole world of communication  
> is on Wave, you can collapse/delete replies that don't interest you.  
> One day... :)
>
> - pamela
>
> On Tue, Nov 10, 2009 at 12:44 PM, Oliver Baker   
> wrote:
>
> Yes,
>
> I have so many times posted questions on groups and forums etc... and
> had my question been answered half way down the page. because people
> post their opinion or side, whatever, which is not an answer.
>
> And you my friend, have made my point, congrats. (I have to now I have
> replied to you tho).
>
> -
>
> Thanks Pamela
>
> On Nov 10, 11:46 am, David Nesting  wrote:
> > On Mon, Nov 9, 2009 at 2:04 PM, Oliver Baker   
> wrote:
> > > PLEASE DO NOT POST THE FIRST REPLY IF IT IS NOT AN ANSWER, I DON'T
> > > WANT TO ANSWER TO BE 20 REPLIES DOWN!
> >
> > > P.S: The FIRST REPLY must be an Answer, not an opinion (e.g: "Yeah
> > > when will it come out" (Not that))
> >
> > Seriously?
>
>
>
> >


--~--~-~--~~~---~--~~
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: Google Wave Data API

2009-11-10 Thread Mark Gallop
On 10/11/2009, at 6:46 AM, David Nesting wrote:

> On Mon, Nov 9, 2009 at 2:04 PM, Oliver Baker   
> wrote:
> PLEASE DO NOT POST THE FIRST REPLY IF IT IS NOT AN ANSWER, I DON'T
> WANT TO ANSWER TO BE 20 REPLIES DOWN!
>
> P.S: The FIRST REPLY must be an Answer, not an opinion (e.g: "Yeah
> when will it come out" (Not that))
>
> Seriously?

Hilarious. I wish you had posted this before Pamela. There would have  
been fireworks!!

Mark
--~--~-~--~~~---~--~~
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: Google Calendar?

2009-11-10 Thread OneRyt

http://i77.photobucket.com/albums/j46/OneRyt/Calendar-Suggestion.png

thought html would work. haha

On Nov 9, 9:07 am, Matias Molinas  wrote:
> I am developing a robot and a gadget to integrate the calendar, 
> seewww.bubaproject.com, but is still in an early stage.
>
> In a week will be available a version with minimal functionality.
>
> Greetings
>
> 2009/11/8 OneRyt :
>
>
>
>
>
> > http://s77.photobucket.com/albums/j46/OneRyt/?
> > action=view¤t=Calendar-Suggestion.png" target="_blank"> > src="http://i77.photobucket.com/albums/j46/OneRyt/Calendar-
> > Suggestion.png" border="0" alt="Photobucket">
>
> > On Nov 7, 4:20 pm, OneRyt  wrote:
> >> It seems almost a no brainer to add a google calendar application/bot
> >> to google wave... if it's such a collaborative tool, dates and
> >> appointment invitations etc. are of paramount importance to be tied
> >> into it.

--~--~-~--~~~---~--~~
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] Wave Embed API: OpenSocialWave Class and Other Classes/Methods

2009-11-10 Thread io-tmp

Hi All,

I am wondering whether the OpenSocialWave class is live for the Embed
API.  Based on some testing, it appears that this class is not yet
available (FireBug error console shows: OpenSocialWave is not
defined).

Also wondering what other methods are not supported.  For example, it
appears that the set* methods for the UIConfig class are not working
as intended.

Cheers,

Andres


--~--~-~--~~~---~--~~
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] Modify Profile image programmatically

2009-11-10 Thread Sebastien Plisson

Hello,

How can I modify a user profile image through an API ?

from a robot or an extension ?

Thank you

Sebastien

--~--~-~--~~~---~--~~
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] four changes (replaces) in one robot event

2009-11-10 Thread Hans Nouwens

Hi,

I'm trying my First steps on the wave with a simple robot that
replaces instances of [search] with [found] and colours them red.
Strangely this works most of the times

When the blip contains [search][search][search][search] it only
changes the first one.
In the debugging log there is mention of 4 operations to the blip. It
even appends a text stating that it changed 4 occurrences.
(see below)

In the client I can only see one (1) [search] changing to [found]. The
append is never shown.
Only when the last one is changed it changes to red.

Ideas?

Now the strangest thing: whenever this any text between the
[search]'s, even a single space, the robot works as expected and
changes the four instances. No append is shown.

Ideas?

My code:
String searchText = "[search]";
String replaceText = "[found]";
Range range = null;
while (view.getText().toLowerCase().indexOf(searchText) >= 0) {

log.info("IndexOf="+(view.getText().toLowerCase().indexOf(searchText)));
int start = view.getText().toLowerCase().indexOf(searchText);
range = new Range(start, start + searchText.length());
view.replace(range, replaceText);
range = new Range(start,start + replaceText.length());
view.setAnnotation(range, "style/color", "rgb(255, 0, 0)");
numberReplaced++;
}
view.appendStyledText(new StyledText(numberReplaced +"\n replaces
done", StyleType.ITALIC));

Met vriendelijke groet / with kind regards, Hans Nouwens.

The debug log of the first event with 4 [search] occurrences:

org.nouwens.wave.MyFirsty.MyFirstyWaveServlet processEvents: IndexOf=0
org.nouwens.wave.MyFirsty.MyFirstyWaveServlet processEvents: IndexOf=7
org.nouwens.wave.MyFirsty.MyFirstyWaveServlet processEvents:
IndexOf=14 org.nouwens.wave.MyFirsty.MyFirstyWaveServlet
processEvents: IndexOf=21

com.google.wave.api.AbstractRobotServlet serializeOperations: Outgoing
operations: 
{"javaClass":"com.google.wave.api.impl.OperationMessageBundle","operations":{"javaClass":"java.util.ArrayList","list":[{"index":-1,"waveletId":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.api.impl.OperationImpl","property":{"start":0,"javaClass":"com.google.wave.api.Range","end":8},"waveId":"wavesandbox.com!w+3in3A4ZaM","type":"DOCUMENT_DELETE"},{"index":0,"waveletId":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.api.impl.OperationImpl","property":"[found]","waveId":"wavesandbox.com!w+3in3A4ZaM","type":"DOCUMENT_INSERT"},{"index":0,"waveletId":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.api.impl.OperationImpl","property":{"range":{"start":0,"javaClass":"com.google.wave.api.Range","end":37},"name":"style/color","value":"rgb(255,
0, 
0)","javaClass":"com.google.wave.api.Annotation"},"waveId":"wavesandbox.com!w+3in3A4ZaM","type":"DOCUMENT_ANNOTATION_SET"},{"index":0,"waveletId":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.api.impl.OperationImpl","property":{"range":{"start":0,"javaClass":"com.google.wave.api.Range","end":37},"name":"style/fontWeight","value":"bold","javaClass":"com.google.wave.api.Annotation"},"waveId":"wavesandbox.com!w+3in3A4ZaM","type":"DOCUMENT_ANNOTATION_SET"},{"index":-1,"waveletId":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.api.impl.OperationImpl","property":{"start":7,"javaClass":"com.google.wave.api.Range","end":15},"waveId":"wavesandbox.com!w+3in3A4ZaM","type":"DOCUMENT_DELETE"},{"index":7,"waveletId":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.api.impl.OperationImpl","property":"[found]","waveId":"wavesandbox.com!w+3in3A4ZaM","type":"DOCUMENT_INSERT"},{"index":0,"waveletId":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.api.impl.OperationImpl","property":{"range":{"start":7,"javaClass":"com.google.wave.api.Range","end":37},"name":"style/color","value":"rgb(255,
0, 
0)","javaClass":"com.google.wave.api.Annotation"},"waveId":"wavesandbox.com!w+3in3A4ZaM","type":"DOCUMENT_ANNOTATION_SET"},{"index":0,"waveletId":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.api.impl.OperationImpl","property":{"range":{"start":7,"javaClass":"com.google.wave.api.Range","end":37},"name":"style/fontWeight","value":"bold","javaClass":"com.google.wave.api.Annotation"},"waveId":"wavesandbox.com!w+3in3A4ZaM","type":"DOCUMENT_ANNOTATION_SET"},{"index":-1,"waveletId":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.api.impl.OperationImpl","property":{"start":14,"javaClass":"com.google.wave.api.Range","end":22},"waveId":"wavesandbox.com!w+3in3A4ZaM","type":"DOCUMENT_DELETE"},{"index":14,"waveletId":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.api.impl.OperationImpl","property":"[found]","waveId":"wavesa

[Google Wave APIs] four changes (replaces) in one robot event

2009-11-10 Thread Hans Nouwens

Hi,

I'm trying my First steps on the wave with a simple robot that replaces
instances of [search] with [found] and colours them red.
Strangely this works most of the times

When the blip contains [search][search][search][search] it only changes the
first one.
In the debugging log there is mention of 4 operations to the blip. It even
appends a text stating that it changed 4 occurrences.
(see below)

In the client I can only see one (1) [search] changing to [found]. The
append is never shown.
Only when the last one is changed it changes to red.

Ideas?

Now the strangest thing: whenever this any text between the [search]'s, even
a single space, the robot works as expected and changes the four instances.
No append is shown.

Ideas?

My code:
String searchText = "[search]";
String replaceText = "[found]";
Range range = null;
while (view.getText().toLowerCase().indexOf(searchText) >= 0) {

log.info("IndexOf="+(view.getText().toLowerCase().indexOf(searchText)));
int start =
view.getText().toLowerCase().indexOf(searchText);
range = new Range(start, start + searchText.length());
view.replace(range, replaceText);
range = new Range(start,start + replaceText.length());
view.setAnnotation(range, "style/color", "rgb(255, 0, 0)");
numberReplaced++;
}
view.appendStyledText(new StyledText(numberReplaced +"\n replaces
done", StyleType.ITALIC));

Met vriendelijke groet / with kind regards, Hans Nouwens.

The debug log of the first event with 4 [search] occurrences:

org.nouwens.wave.MyFirsty.MyFirstyWaveServlet processEvents: IndexOf=0 
org.nouwens.wave.MyFirsty.MyFirstyWaveServlet processEvents: IndexOf=7 
org.nouwens.wave.MyFirsty.MyFirstyWaveServlet processEvents: IndexOf=14 
org.nouwens.wave.MyFirsty.MyFirstyWaveServlet processEvents: IndexOf=21

com.google.wave.api.AbstractRobotServlet serializeOperations: Outgoing
operations:
{"javaClass":"com.google.wave.api.impl.OperationMessageBundle","operations":
{"javaClass":"java.util.ArrayList","list":[{"index":-1,"waveletId":"wavesand
box.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.api.i
mpl.OperationImpl","property":{"start":0,"javaClass":"com.google.wave.api.Ra
nge","end":8},"waveId":"wavesandbox.com!w+3in3A4ZaM","type":"DOCUMENT_DELETE
"},{"index":0,"waveletId":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO"
,"javaClass":"com.google.wave.api.impl.OperationImpl","property":"[found]","
waveId":"wavesandbox.com!w+3in3A4ZaM","type":"DOCUMENT_INSERT"},{"index":0,"
waveletId":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"c
om.google.wave.api.impl.OperationImpl","property":{"range":{"start":0,"javaC
lass":"com.google.wave.api.Range","end":37},"name":"style/color","value":"rg
b(255, 0,
0)","javaClass":"com.google.wave.api.Annotation"},"waveId":"wavesandbox.com!
w+3in3A4ZaM","type":"DOCUMENT_ANNOTATION_SET"},{"index":0,"waveletId":"waves
andbox.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.ap
i.impl.OperationImpl","property":{"range":{"start":0,"javaClass":"com.google
.wave.api.Range","end":37},"name":"style/fontWeight","value":"bold","javaCla
ss":"com.google.wave.api.Annotation"},"waveId":"wavesandbox.com!w+3in3A4ZaM"
,"type":"DOCUMENT_ANNOTATION_SET"},{"index":-1,"waveletId":"wavesandbox.com!
conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.api.impl.Oper
ationImpl","property":{"start":7,"javaClass":"com.google.wave.api.Range","en
d":15},"waveId":"wavesandbox.com!w+3in3A4ZaM","type":"DOCUMENT_DELETE"},{"in
dex":7,"waveletId":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO","javaC
lass":"com.google.wave.api.impl.OperationImpl","property":"[found]","waveId"
:"wavesandbox.com!w+3in3A4ZaM","type":"DOCUMENT_INSERT"},{"index":0,"wavelet
Id":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.goog
le.wave.api.impl.OperationImpl","property":{"range":{"start":7,"javaClass":"
com.google.wave.api.Range","end":37},"name":"style/color","value":"rgb(255,
0,
0)","javaClass":"com.google.wave.api.Annotation"},"waveId":"wavesandbox.com!
w+3in3A4ZaM","type":"DOCUMENT_ANNOTATION_SET"},{"index":0,"waveletId":"waves
andbox.com!conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.ap
i.impl.OperationImpl","property":{"range":{"start":7,"javaClass":"com.google
.wave.api.Range","end":37},"name":"style/fontWeight","value":"bold","javaCla
ss":"com.google.wave.api.Annotation"},"waveId":"wavesandbox.com!w+3in3A4ZaM"
,"type":"DOCUMENT_ANNOTATION_SET"},{"index":-1,"waveletId":"wavesandbox.com!
conv+root","blipId":"b+3in3A4ZaO","javaClass":"com.google.wave.api.impl.Oper
ationImpl","property":{"start":14,"javaClass":"com.google.wave.api.Range","e
nd":22},"waveId":"wavesandbox.com!w+3in3A4ZaM","type":"DOCUMENT_DELETE"},{"i
ndex":14,"waveletId":"wavesandbox.com!conv+root","blipId":"b+3in3A4ZaO","jav
aClass":"com.google.wave.api.impl.OperationImpl","propert

[Google Wave APIs] Measuring latency?

2009-11-10 Thread Chris Casey

Is there any built-in way for a robot or gadget to determine the
network latency between two active participants in a wave? All I can
think of right now is for the participants to regularly ping back and
forth to each other by setting gadget states, which could get pretty
hairy if every state change is remembered in the wave history.

--~--~-~--~~~---~--~~
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: Does robots have full AppEngine capabilities

2009-11-10 Thread Daniel Faust

I think the users service can't be used properly. At least not in the
sandbox (didn't try on googlewave.com).

On Nov 10, 4:18 pm, Leitzler  wrote:
> Yes.
>
> On Nov 10, 2:29 pm, maxsap  wrote:
>
> > Hello all, I was reading about google appengine capabilities and I was
> > wondering if a google wave robot has all this capabilities and
> > services described here(http://code.google.com/intl/el/appengine/docs/
> > java/overview.html) since all the robots run on the app engine?
> > thanks in advanced maxsap
--~--~-~--~~~---~--~~
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: multiple gadgets sharing state

2009-11-10 Thread Austin Chau (Google employee)
No gadget states are specific to each gadget and not shared among other
gadgets within the same wave.

There are several ways to maintain "state" among different gadgets of the
same wave, you can maintained your own persistent storage on remote server
and use some crossdomain mechanism (jsonp, script injection, etc) to share
data.  You can also use wave robot to maintain data for you and store them
on the wave data document.

Austin

On Tue, Nov 10, 2009 at 10:00 AM, rgibson wrote:

>
> I would like to share state between multiple gadgets.  When I read the
> wave gadgets tutorial, it sounded as if the state was stored at the
> Wave level.  (E.g., call wave.getState() to get the state, gadgets
> "share state", etc.)  So there would be one "count" per Wave, not one
> "count" per gadget.
>
> Of course, this introduces its own problems (e.g., every gadget
> developer has to know about the namespace of every other gadget.)  And
> a quick check shows that if you run two examples of the "count"
> example gadget, they each have their own "count" variable that updates
> independently.
>
> So is there a way for two gadgets in a Wave to share their state?  Or,
> what's the best way to do this?
>
> I am new at this and trying to poke my way through the documents, but
> I've gotten to the point where it's better to ask.
>
> Thanks,
> Rob
> >
>

--~--~-~--~~~---~--~~
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] multiple gadgets sharing state

2009-11-10 Thread rgibson

I would like to share state between multiple gadgets.  When I read the
wave gadgets tutorial, it sounded as if the state was stored at the
Wave level.  (E.g., call wave.getState() to get the state, gadgets
"share state", etc.)  So there would be one "count" per Wave, not one
"count" per gadget.

Of course, this introduces its own problems (e.g., every gadget
developer has to know about the namespace of every other gadget.)  And
a quick check shows that if you run two examples of the "count"
example gadget, they each have their own "count" variable that updates
independently.

So is there a way for two gadgets in a Wave to share their state?  Or,
what's the best way to do this?

I am new at this and trying to poke my way through the documents, but
I've gotten to the point where it's better to ask.

Thanks,
Rob
--~--~-~--~~~---~--~~
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: Google Wave Data API

2009-11-10 Thread Wooble



On Nov 9, 8:44 pm, Oliver Baker  wrote:
> Yes,
>
> I have so many times posted questions on groups and forums etc... and
> had my question been answered half way down the page. because people
> post their opinion or side, whatever, which is not an answer.
>
> And you my friend, have made my point, congrats. (I have to now I have
> replied to you tho).

I'm sure one day you'll reach your goal of everyone just ignoring you
and not giving you an answer at all.

PLEASE DO NOT REPLY TO THIS POST UNLESS YOU AGREE WITH ME.
--~--~-~--~~~---~--~~
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: Does robots have full AppEngine capabilities

2009-11-10 Thread Leitzler

Yes.

On Nov 10, 2:29 pm, maxsap  wrote:
> Hello all, I was reading about google appengine capabilities and I was
> wondering if a google wave robot has all this capabilities and
> services described here(http://code.google.com/intl/el/appengine/docs/
> java/overview.html) since all the robots run on the app engine?
> thanks in advanced maxsap
--~--~-~--~~~---~--~~
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: Google Wave Data API

2009-11-10 Thread Leitzler

The attitude you are using here Oliver is kind of similar to if I
would walk into a restaurant and yell:
"I WANT A HAMBURGER AND I DO NOT WANT TO WAIT FOR MORE THAN 15
MINUTES, PLEASE DO NOT MAKE ME WAIT MORE THAN 15 MINUTES! I'VE BOUGHT
FOOD FROM OTHER RESTAURANTS WHERE THEY LET ME WAIT FOR MORE THEN 15
MINUTES SO MANY TIMES!".

Rather psychotic behaviour in my opinion.

Sorry for the off topic post, just trying to explain why people react
like they do.

In Pamela's future, Wave will be the soup nazi.. One day :)

On Nov 10, 4:04 am, "pamela (Google Employee)" 
wrote:
> This is the nature of forums. Once the whole world of communication is on
> Wave, you can collapse/delete replies that don't interest you. One day... :)
>
> - pamela
>
> On Tue, Nov 10, 2009 at 12:44 PM, Oliver Baker  wrote:
>
> > Yes,
>
> > I have so many times posted questions on groups and forums etc... and
> > had my question been answered half way down the page. because people
> > post their opinion or side, whatever, which is not an answer.
>
> > And you my friend, have made my point, congrats. (I have to now I have
> > replied to you tho).
>
> > -
>
> > Thanks Pamela
>
> > On Nov 10, 11:46 am, David Nesting  wrote:
> > > On Mon, Nov 9, 2009 at 2:04 PM, Oliver Baker  wrote:
> > > > PLEASE DO NOT POST THE FIRST REPLY IF IT IS NOT AN ANSWER, I DON'T
> > > > WANT TO ANSWER TO BE 20 REPLIES DOWN!
>
> > > > P.S: The FIRST REPLY must be an Answer, not an opinion (e.g: "Yeah
> > > > when will it come out" (Not that))
>
> > > Seriously?
--~--~-~--~~~---~--~~
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] Does robots have full AppEngine capabilities

2009-11-10 Thread maxsap

Hello all, I was reading about google appengine capabilities and I was
wondering if a google wave robot has all this capabilities and
services described here(http://code.google.com/intl/el/appengine/docs/
java/overview.html) since all the robots run on the app engine?
thanks in advanced maxsap
--~--~-~--~~~---~--~~
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: google wave protocol and regular xmpp server compatibility

2009-11-10 Thread maxsap

Hello Pamela, thanks for the quick responce I will post it there

On Nov 10, 2:56 am, "pamela (Google Employee)" 
wrote:
> Hi maxsap-
>
> I'd suggest posting in the protocol forum for a better chance of a good
> response:http://groups.google.com/group/wave-protocol
>
> - pamela
>
>
>
> On Tue, Nov 10, 2009 at 10:18 AM, maxsap  wrote:
>
> > Hello all, I am developing robot and currently I am using an xmpp
> > server my question is if the wave protocol is 100% compatible with a
> > regular xmpp server (e.g. openfire,or a xmpp RA)? if yes can I also
> > use all the xmpp extensions (jingle...)? I have read the draft
> > specification but don't quite understand if this is possible.
> > would I have to make a connection with an extra library (say smack for
> > example) or i don't have to use any special libraries?
> > thanks in advances maxsap- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---