Hi Mikey,

On Thu, Dec 3, 2009 at 4:50 AM, frak <[email protected]> wrote:
> OK, having gone through the API reference, I can see there there is no
> easy way to do this, so I am going to have to go through each match
> individually (given the number of patterns I have this will be tricky,
> but not impossible).  What I would now like to know is that whether or
> not the match position in a string representation of a document will
> be valid to use as a range for a replacement in the TextView?
>

If you are using the python API, you can use SetTextInRange, which
won't affect the annotations outside the range. My two bots use this,
so you can look at the code at :


http://launchpad.net/annoty
and
https://launchpad.net/wavebiblebot


if you want to see implementation samples.

In these bots, I've found it useful to add a Replace class which
manages the replacements in range and an array of annotations to apply
to each replacement. Annoty has the most complete Replace class.


Cheers,


Raphaël





> On Dec 3, 11:48 am, frak <[email protected]> wrote:
>> Hi,
>>
>> I currently have a robot that makes replacements to text over an
>> entire blip, and I am doing a replaceAll over the getDocument().getText
>> () that is returned from the blip.  However, when I do this, any
>> annotations (such as links, bold text etc) are lost - is there any way
>> of doing a replaceAll that leaves the annotations intact?
>>
>> regards,
>>
>> Mikey
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Google Wave API" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-wave-api?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Google Wave API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en.


Reply via email to