ok thanks,
for blip.first(String arg);
what does it return if the content of the blip does not contains the
arg?
and how do we know if the given arg does not exist in the blip?
currently i am using blip.getContent().contains(arg) before i call
blip.first(arg)
On Jul 19, 1:07 pm, Joe Gregorio <
j...@bitworking.org> wrote:
> On Fri, Jul 16, 2010 at 2:40 AM, Alex <
monsterno...@gmail.com> wrote:
> > i have a few question for the selectors and action (java api)
>
> > the blip.first(String arg); is the arg a regular expression or just a
> > normal string? i tried regular expression \[new\], it matches only \
> > [new\] and not [new].
>
> That is just a normal string. You can do event filtering using regular
> expressions, but
> that is done using a @Capability annotation in Java:
>
>
http://code.google.com/apis/wave/extensions/robots/events.html#EventF...
>
>
>
> > and once i get the BlipContentRefs, i tried the delete() method and
> > then add a gadget, but the specified string is still in the blip and
> > this cause a infinite loop of onDocumentChangedEvent.
>
> Can you try just deleting the text first and not inserting the gadget and
> determine if that still causes an infinite loop?
>
> Thanks,
> -joe
>
> --
> Joe Gregorio
> Developer Relations, Google Wave
>
>
>
> > how do i prevent the infinite loop? the delete() method dont seem to
> > work.
>
> > and i have tried using
> > Map<String, String> restrictions = new HashMap<String, String>();
> > BlipIterator iterator = new BlipIterator.ElementIterator(blip,
> > ElementType.GADGET, restrictions, -1);
> > int start = iterator.next().getStart();
> > as suggested inhttp://
wave-api-faq.appspot.com/#elementindex
>
> > to chk if the gadget exist in the blip, but eclipse complain that
> > BlipIterator.ElementIterator is not visible.
>
> > --
> > 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-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
google-wave-a...@googlegroups.com<
google-wave-api%2Bunsu...@googlegroups.com>
> > .