TextView textView = robotBlip.getDocument();
textView.append("Text awaiting some wave styling ");
textView.setAnnotation(new Range(2, 100), "style/fontWeight", "bold");
While developing a bot for Google Wave, I found out that styles are set using setAnnotations method which take a range of indices for the characters to be styles. Also this method takes a string for the style function name, and the actual string value. This is a wasteful operation since the server has to send the events "setAnnotation" back to the bot without consideration of whether or not the annotation already exists. This will cause unnecessary network traffic and makes bots more prone to loop errors.
Work around by:
Google Wave API:
No comments:
Post a Comment