[Google Wave APIs] Re: How to walk a blip hierarchy

2009-10-12 Thread F. Andy Seidl

Jeremy: I'm coming to the same conslusion--the API does not allow
traversing the blip hierarchy.  Just to be clear, though, when you
suggest "storing every blip submitted" do you mean storing blip IDs or
actually storing a copy of the blip data of every blip?

What's I'd really like to be able to do is to located a specific blip
within a wave and automatically update it. If a robot has a
"reference" blip (that does not have the actual blip content), can the
API update that blip (i.e., give it new content)? If so, I could have
the robot store the blip reference and its content outside the wave.

On Oct 11, 12:27 am, Jeremy  wrote:
> I tried to do this for a while and came to the conclusion that as of
> now, the API does not supply a way to traverse the whole blip
> hierarchy. The best thing I cam eup with was just storing the every
> blip submitted. That way you at least have access to all the blips
> submitted after the robot has joined the wave.
>
> Hope that helps,
> -Jeremy
>
> On Oct 10, 3:36 pm, "F. Andy Seidl" 
> wrote:
>
>
>
> > Is is possible for a robot to walk the blip hierarchy in response to a
> > BLIP_SUBMITTED (or any other) event? I have tried a number of
> > experiments, but am still unclear on some things:
>
> > 1) calling getRootBlip() does not always yeild a Blip that can be
> > accessed; is this true?
> > 2) what is the relationship between "inline blips" and "child blips"?
> > Does Blip.getChildren() return inline blips?
> > 3) is it the case that a robot simply cannot, in general, traverse all
> > the blips in a wavelet (perhaps, because the necessary metadata was
> > not included with the event and there is no API for accessing metadata
> > not provided with the event)?
>
> > Thanks.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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-api@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
-~--~~~~--~~--~--~---



[Google Wave APIs] How to walk a blip hierarchy

2009-10-10 Thread F. Andy Seidl

Is is possible for a robot to walk the blip hierarchy in response to a
BLIP_SUBMITTED (or any other) event? I have tried a number of
experiments, but am still unclear on some things:

1) calling getRootBlip() does not always yeild a Blip that can be
accessed; is this true?
2) what is the relationship between "inline blips" and "child blips"?
Does Blip.getChildren() return inline blips?
3) is it the case that a robot simply cannot, in general, traverse all
the blips in a wavelet (perhaps, because the necessary metadata was
not included with the event and there is no API for accessing metadata
not provided with the event)?

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 google-wave-api@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
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: Creating some annotated text to append to a blip

2009-10-10 Thread F. Andy Seidl

Take a look at TextView.appendMarkup().  This method lets you append
text containing marketup which is then converted to annotations for
you.

On Oct 10, 12:06 pm, Smola  wrote:
> Well it seems that this post has fallen by the wayside.  Fortunately,
> another post was made that indeed assists me with this problem.  It
> involves creating text, appending it, then annotating it.  It is
> located at:
>
> http://groups.google.com/group/google-wave-api/browse_thread/thread/e...
>
> However, my original goal was the create a chunk of text PRE-ANNOTATED
> and then append it to a blip.  Is this even possible right now??
>
> On Oct 4, 11:16 pm, Smola  wrote:
>
>
>
> > I simply cannot wrap my head around this problem!  I have done
> > everything I can think of but I simply can't figure it out!  I'm sure
> > it's an easy fix as well.  I am fairly new to Java but have a pretty
> > good amount of experience of programming in general.
>
> > Anyway, enough with the preface.  I want to detect that a blip has
> > been submitted (which I can do) and then append some styled text on
> > the end of the blip (on a new line).  I can append unstyled text
> > easily with the append() method.  I can also use setAnnotations() to
> > change some styles on the entire text of the blip.  But I can't figure
> > out how to take some text, style it with colors or whatever, and then
> > append it.  I read up on theStyledTextclass but that deals with bold/
> > underlined, etc type styles it seems.  I also tried using TextView as
> > a constructor to create an empty TextView type variable but, silly me,
> > TextView is an interface and has no constructor.  So then I tried
> > taking the TextView variable I got from blip.getDocument() and tried
> > to delete() the contents and repopulate them but that didn't work
> > because the delete() method returns void.  I feel ridiculous because
> > this must have a very basic solution but I just can't find it.  I
> > would really appreciate it if someone would help me out on this!- Hide 
> > quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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-api@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
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: how to detect a new blip added to a wave?

2009-10-10 Thread F. Andy Seidl

Make sure your robot has registered receive the BLIP_SUBMITTED event.
You capaibilities.xml file must specify that you want that event.
When you modify capabilities.xml, be sure to update the version number
in that file or the change will not take effect.

On Oct 10, 6:50 am, twdarkflame  wrote:
> I'm probably doing something silly here, but I'm just trying to get my
> bot to respond to a post.
>
> I tried;
>
>  for (Event e: bundle.getBlipSubmittedEvents()) {
>            Blip blip2 = wavelet.appendBlip();
>               TextView textView2 = blip2.getDocument();
>               textView2.append("event="+e.getType().toString());
>
>               if (e.getType() == EventType.BLIP_SUBMITTED) {
>
>                   Blip blip3 = wavelet.appendBlip();
>                   TextView textView3 = blip3.getDocument();
>                   textView3.append("Thats a good comment!5/10");
>                 }
>
>               if (e.getType() == EventType.WAVELET_BLIP_CREATED ) {
>                   Blip blip4 = wavelet.appendBlip();
>                   TextView textView4 = blip4.getDocument();
>                   textView4.append("Thats a good comment! 10/10");
>                 }
>     }
>
> And I get nothing at all
>
> I also tried putting it in the
>  for (Event e: bundle.getEvents()) {
> ...
>
> }
>
> loop and also nothing.
>
> However,  if (e.getType() == EventType.WAVELET_PARTICIPANTS_CHANGED)
> {    
> does trigger an response.
> And so does bundle.wasSelfAdded() (which of course isnt in a loop).
>
> So...what am I missing?
--~--~-~--~~~---~--~~
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-api@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
-~--~~~~--~~--~--~---



[Google Wave APIs] Blip.delete() null pointer exception -- API bug?

2009-10-09 Thread F. Andy Seidl

I'm trying to get a robot to clean up a wave by deleting a number of
blips based on various criteria.  I'm using Blip.delete() and it
sometimes works and sometimes throws a null pointer exception. (The
exception occurs in BlipImpl trying to access a null blipData field.)

Is there *any* reason that BlipImpl.blipData should *ever* be null?
It seems like the answer is "no" and that this is an API bug.

Thoughts?
--~--~-~--~~~---~--~~
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-api@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
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: How to append text following an annotation?

2009-10-09 Thread F. Andy Seidl

Austin: thanks; that does work.  The problem is, as far as I can tell,
if you start with a blip that is already annotated all the way to the
end (e.g., there is an annotation on the last character), there is no
way to append text without expanding that ending annotation.

On Oct 8, 5:50 pm, "Austin Chau (Google employee)"
 wrote:
> You can insert a space after the anchor text and only annotate the anchor
> text just before the trailing.  Quick sample code -
>   private void addAnchorLink(Blip blip, int startIndex, String url, String
> anchorText) {
>     anchorText += " ";
>     TextView textView = blip.getDocument();
>     textView.insert(startIndex, anchorText);
>     textView.setAnnotation(new Range(startIndex, startIndex +
> anchorText.length() - 1),
>         "link/manual", url);
>   }
>
> On Thu, Oct 8, 2009 at 1:24 PM, F. Andy Seidl
> wrote:
>
>
>
>
>
> > Thanks, I'll try appending a single newline, removing all annotations
> > from that character, and then appending the rest of the text.
>
> > On Oct 8, 2:00 pm, Tad Glines  wrote:
> > > I think the wave OT will automatically expand annotations that extend
> > > to the end of the blip/document. You will probably have to manually
> > > un-expand any annotations that extend to the end of the text.
>
> > > On Thu, Oct 8, 2009 at 5:35 AM, F. Andy Seidl
>
> > >  wrote:
>
> > > > I'm having difficutlty appending text following an annotation.  The
> > > > issue is that the existing annotation that extends to the end of the
> > > > TextView is automatically expanding to include the newly appended
> > > > text.  I've experimented with a number of methods for appending text,
> > > > but they all seem to produce the same outcome.
>
> > > > Is there a trick I'm overlooking?
>
> > > > Thanks,
> > > >  -- fas- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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-api@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
-~--~~~~--~~--~--~---



[Google Wave APIs] Re: How to append text following an annotation?

2009-10-08 Thread F. Andy Seidl

Thanks, I'll try appending a single newline, removing all annotations
from that character, and then appending the rest of the text.

On Oct 8, 2:00 pm, Tad Glines  wrote:
> I think the wave OT will automatically expand annotations that extend
> to the end of the blip/document. You will probably have to manually
> un-expand any annotations that extend to the end of the text.
>
> On Thu, Oct 8, 2009 at 5:35 AM, F. Andy Seidl
>
>
>
>  wrote:
>
> > I'm having difficutlty appending text following an annotation.  The
> > issue is that the existing annotation that extends to the end of the
> > TextView is automatically expanding to include the newly appended
> > text.  I've experimented with a number of methods for appending text,
> > but they all seem to produce the same outcome.
>
> > Is there a trick I'm overlooking?
>
> > Thanks,
> >  -- fas- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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-api@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
-~--~~~~--~~--~--~---



[Google Wave APIs] External robot event triggers

2009-10-08 Thread F. Andy Seidl

I would like to create a robot that can *initiate* conversation
activity rather than simply respond to activity of another
participant.  Is there some way to externally generate an event on a
wave that a robot can then monitor that could signal the robot to
initiate activity?  For example, suppose I wanted a robot to update a
wave when a meeting room became available?  If I have code that
detects when the meeting room becomes available, how could I signal
the robot when this occurs?

--~--~-~--~~~---~--~~
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-api@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
-~--~~~~--~~--~--~---



[Google Wave APIs] How to append text following an annotation?

2009-10-08 Thread F. Andy Seidl

I'm having difficutlty appending text following an annotation.  The
issue is that the existing annotation that extends to the end of the
TextView is automatically expanding to include the newly appended
text.  I've experimented with a number of methods for appending text,
but they all seem to produce the same outcome.

Is there a trick I'm overlooking?

Thanks,
  -- fas

--~--~-~--~~~---~--~~
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-api@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
-~--~~~~--~~--~--~---