The code seems right to me. Did you see the comments in the API?

This is equivalent to the two operations, deleteText() and appendText
() and affects existing annotations and entities accordingly.
http://wave-robot-java-client.googlecode.com/svn/trunk/doc/com/google/wave/api/TextView.html#replace(java.lang.String)

Have a try^^


On 12 Dez., 15:52, Dean C <dean.clatwor...@gmail.com> wrote:
> I am trying to get my robot to take a users blip and edit the text.
> For testing purposes I'm simply trying to replace all the text that
> they typed with my own. I am using the following code:
>
>   public void processEvents(RobotMessageBundle bundle)
>   {
>         // get the wavelet
>     Wavelet wavelet = bundle.getWavelet();
>
>     // otherwise iterate through our bundle of events
>     for (Event e: bundle.getEvents())
>     {
>       if (e.getType() == EventType.BLIP_SUBMITTED)
>       {
>           // get the creator of the blip
>           String blipSubmitter = e.getBlip().getCreator();
>
>           // get the blip
>           Blip blip = e.getBlip();
>           TextView textView = blip.getDocument();
>
>           // get what the user entered
>           String userInput = textView.getText();
>
>           textView.replace("test");
>
>       }
>     }
>   }
>
> Unfortunately, it's simply not replacing the users input with my test
> string. Any ideas why? I am sure it is something obvious and simple :)

--

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


Reply via email to