Austin: thanks; that does work.  The problem is, as far as I can tell,
if you start with a blip that is already annotated all the way to the
end (e.g., there is an annotation on the last character), there is no
way to append text without expanding that ending annotation.

On Oct 8, 5:50 pm, "Austin Chau (Google employee)"
<api.aus...@google.com> wrote:
> You can insert a space after the anchor text and only annotate the anchor
> text just before the trailing.  Quick sample code -
>   private void addAnchorLink(Blip blip, int startIndex, String url, String
> anchorText) {
>     anchorText += " ";
>     TextView textView = blip.getDocument();
>     textView.insert(startIndex, anchorText);
>     textView.setAnnotation(new Range(startIndex, startIndex +
> anchorText.length() - 1),
>         "link/manual", url);
>   }
>
> On Thu, Oct 8, 2009 at 1:24 PM, F. Andy Seidl
> <fase...@myst-technology.com>wrote:
>
>
>
>
>
> > Thanks, I'll try appending a single newline, removing all annotations
> > from that character, and then appending the rest of the text.
>
> > On Oct 8, 2:00 pm, Tad Glines <tad.gli...@gmail.com> wrote:
> > > I think the wave OT will automatically expand annotations that extend
> > > to the end of the blip/document. You will probably have to manually
> > > un-expand any annotations that extend to the end of the text.
>
> > > On Thu, Oct 8, 2009 at 5:35 AM, F. Andy Seidl
>
> > > <fase...@myst-technology.com> wrote:
>
> > > > I'm having difficutlty appending text following an annotation.  The
> > > > issue is that the existing annotation that extends to the end of the
> > > > TextView is automatically expanding to include the newly appended
> > > > text.  I've experimented with a number of methods for appending text,
> > > > but they all seem to produce the same outcome.
>
> > > > Is there a trick I'm overlooking?
>
> > > > Thanks,
> > > >  -- fas- Hide quoted text -
>
> > > - Show quoted text -- 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to