For an operation to be undone, it must have been done already.  The
characters that were deleted from the document can be grabbed and
persisted with the delete operation when the operation is done.  This
allows it to be undone later.  However, the operation sent over the
wire need not contain the string that is to be deleted - this is just
inefficient for no good reason.

Also note that the Google OT white paper uses the range notation:

    The following is a more complex example document operation.

    skip 3
    insert element start with tag "p" and no attributes
    insert characters "Hi there!"
    insert element end
    skip 5
    delete characters 4

Note that the "delete characters" is qualified with an integer, not a
string.

Cheers,

Dan

On Dec 3, 3:53 am, Torben Weis <[email protected]> wrote:
> It seems that the operations are designed to support "undo".
> Thus, the operation deleteCharacters("foo") can be undone while
> deleteCharacters(3) can (by itself) not be undone.
>
> You fill find the same pattern in the operations which change annotations
> and attributes.
> I suppose that this fits nicely into wave's feature of wave playback.
>
> Greetings
> Torben
>
> 2009/12/2 Daniel Paull <[email protected]>
>
>
>
> > The point was that deleteCharacters() should specify a range, so in
> > the case of wave, it should be deleteCharacters( int numChars ),
> > deleteCharacters( string str ).  Notice that retain() does not take a
> > string.

--

You received this message because you are subscribed to the Google Groups "Wave 
Protocol" 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/wave-protocol?hl=en.


Reply via email to