I'm using the ClientConsole source to to create an application, and
I'm having trouble creating a DocOp to edit the root blip of a wave.
There isn't much information about how DocOp's work in the source- how
can I create one to edit the contents of a blip?

I was working with the createAppendBlipDelta() method in ClientUtils,
with this block, but I don't know how to make it get detected as an
edit instead of creating a new blip:

      BufferedDocOp newBlipOp = new DocOpBuilder()
          .elementStart(DocumentConstants.BODY, Attributes.EMPTY_MAP)
          .elementStart(DocumentConstants.LINE, Attributes.EMPTY_MAP)
          .elementEnd() // </line>
          .characters(text)
          .elementEnd() // </body>
          .build();

      // An empty doc op to indicate a new blip is being created.
      BufferedDocOp emptyNewBlipOp = new DocOpBuilder().build();

      // Send the operation.
      ImmutableList<WaveletDocumentOperation> operations =
ImmutableList.of(
          new WaveletDocumentOperation(newBlipId, emptyNewBlipOp),
          new WaveletDocumentOperation(newBlipId, newBlipOp),
          appendToManifest(manifestDocument, newBlipId));
      return new WaveletDelta(author, operations);

-- 
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