Ah, I found my misunderstanding - the cursor annotation seem to show NOT the users caret/cursor position, but the users selected text range. My debugging info shows the selected text range when I highlight some text like so:
Annotation: user/r/kq8Huhy1 value=cmd...@wavesandbox.com range=5 9 So, it appears the actual user's cursor position is unavailable currently - this makes sense now with other answers from Google I've come across. On Nov 25, 6:14 pm, cmdskp <cmd...@gmail.com> wrote: > I'm bearing in mind the draft status on that specification document > and the Roadmap section about: > > "Wave is being actively developed and some features of the > conversation model have not been documented, or may change in the > short term." > > Has anyone had any luck getting cursor annotations recently? I was > trying in my own recent tests just by printing out all annotations and > styles and I didn't get the user cursor ones described on an older > issue here: > > http://code.google.com/p/google-wave-resources/issues/detail?id=190&c... > > I also can't see them in the logs either - for a DOCUMENT_CHANGED > event. Perhaps they are only sent on another event or not sent to > robots? > > If you don't want (or can't currently) monitor the caret annotations > or event.getModifiedBy() - one partial work-around would be to assume > the last contributer (blip.getContributors()) as the modifier - not > accurate though most times. :/ Without the robot being present in the > wave and checking getModifiedBy() I can't see any other way currently. > > On Nov 25, 1:21 pm, qMax <qwigly...@gmail.com> wrote: > > > Refer to conversation > > model:http://www.waveprotocol.org/draft-protocol-specs/wave-conversation-model > > > There're annotations representing all user cursors for blips in edit > > mode. > > > On Nov 25, 12:22 pm, hvt_kg <thaihuyn...@gmail.com> wrote: > > > > Hi all, > > > > I had some issues when try retrieve current user when start edit > > > content. > > > Ex: user A and User B join in wavelet. When user A create blip. at > > > the time I can get Creator with code below it is OK: > > > ... > > > for (Event event : robotMessageBundle.getEvents()) { > > > TextView document = event.getBlip().getDocument(); > > > ............. > > > String creator = > > > event.getBlip().getCreator(); > > > document.append(creator ); > > > ............. > > > > } > > > > ... > > > Also, I want get current user. who edit content in blip. But not work > > > => with current User is Null > > > Ex: At the time, when user B edit content in blip created by User A. > > > I had try get info from User B: name,.. But not work. > > > ... > > > for (Event event : robotMessageBundle.getEvents()) { > > > TextView document = event.getBlip().getDocument(); > > > ............. > > > String userTyping = document .getAuthor(); > > > document.append(userTyping); > > > ............. > > > > } > > > > ... > > > > Anyone can help me? > > > thanks, > > > hvt_kg > > -- You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to google-wave-...@googlegroups.com. To unsubscribe from this group, send email to google-wave-api+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en.