Ah. I believe it means that the new ID will be stored there *after* the operation has been processed.
The API doesn't know the actual ID of the blip until after the operations are sent to the server, and just gives you a temporary ID. The server then puts a datadocument of the new ID in the wavelet, so that you can retrieve it after a DOCUMENT_CHANGED event. I have used a similar technique to find out the ID of a new wave (see: http://wave-samples-gallery.appspot.com/about_app?app_id=60017), I haven't used it to find out the ID of a new blip. I imagine it is the same technique. - pamela On Thu, Dec 31, 2009 at 6:16 PM, atarno <[email protected]> wrote: > hi pamela, > thanks for you reply. > actually, i was expecting the behavior i described above after reading > the following in the api (http://wave-robot-java-client.googlecode.com/ > svn/trunk/doc/com/google/wave/api/Wavelet.html): > > Blip appendBlip(java.lang.String writeBackDataDocument) > Creates a new blip and appends it to the end of the wavelet. The > resulting blip id of the new blip will be stored in a data document on > the wavelet whose event was being processed at the time the blip was > created. > Parameters: > writeBackDataDocument - The name of the data document to > create. > Returns: > the newly created blip. > > there is a chance i'm the one missing something here :) > thanks again, and happy new year. > > On Dec 31, 1:13 am, "pamela (Google employee)" <[email protected]> > wrote: >> Hi Atarno - >> >> In the first bit of code, you never set the data document, so I would >> expect it to be null. Why were you expecting it to give a value? >> (Maybe I'm missing something). >> >> - pamela >> >> On Dec 17, 8:45 am, atarno <[email protected]> wrote: >> >> > hey all, >> >> > i've noticed that when i run the following: >> >> > wavelet.appendBlip("ID") ; >> > String id = wavelet.getDataDocument("ID"); >> >> > id is null. >> >> > but when i do this: >> >> > Blip initBlip = wavelet.appendBlip(); >> > wavelet.setDataDocument("ID", initBlip.getBlipId()); >> > String id = wavelet.getDataDocument("ID"); >> >> > id gets the expected value of newly created blip id. >> >> > should not the two pieces of code above return the same value of id? >> >> > thanks. > > -- > > 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.
