Blip blip = e.getBlip(); TextView textView = blip.getDocument(); textView.delete(); textView.append("test");
On Dec 12, 6:52 am, 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.