A newbieish question, and sorry if its the wrong place, but pulling my
hair out here a bit as I know its probably obvious.

I have a very specific android client that use's wave protocol as a
means to store and exchange geolocated data. Currently just using a
fedone server/protobufs.

Anyway; How do I edit an existing blip :?

Ive got code to add a blip working (or seems to) just fine. But
editing an existing one is defeating me. I just get lost in all the
code.

---
My current attempt is here;

// update the blip "BlipID" in the wave "WaveID" with the new content
string.

        public void updateBlip(String blipID, String WaveID, String
newcontent) {

                Log.e("wave", "update GO!");

                 ClientWaveView wave = null;

                 try {
                        wave = backend.getWave(( 
WaveId.checkedDeserialise(WaveID) ));
                } catch (InvalidIdException e1) {
                        // TODO Auto-generated catch block

                        Log.i("wave", "failed to get wave from waveletid");
                        return;

                }

                WaveletData tempWaveletData = 
ClientUtils.getConversationRoot(wave);
                Map<String, BufferedDocOp> documentMap =
tempWaveletData.getDocuments();

                 BufferedDocOp manifest = documentMap.get("conversation");
                 try {
                         Log.i("wave", "modifying:");
        
wave.getWavelet(WaveletId.deserialise(blipID)).modifyDocument(newcontent,
manifest);
                         Log.i("wave", "modifed:");
                 } catch (RuntimeInvalidIdException e) {
                        // TODO Auto-generated catch block
                        Log.e("wave", "failed to get wavelet from 
blipID:"+e.getMessage()
+"__"+blipID);

                } catch (OperationException e) {
                        // TODO Auto-generated catch block
                        Log.e("wave", "failed to modify:"+e.getMessage());
                }
                // DocumentBasedManifest.delete(getManifestDocument(wavelet));

                // Preconditions.checkState(manifest == null, "Conversation 
still
usable");
        }


Any pointers? currently the WaveletId is failing...probably because
its just a BlipId being fed to it. But I dont know how to get the
correct one.
If it helps, my waves will always be liner...no inline blips or
replys.

A crude hack solution in the next hour or so Id also appreciated :p
(want to demo this tomorrow at a show...)

Thanks,
Thomas

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