On Fri, Jul 16, 2010 at 2:40 AM, Alex <[email protected]> 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#EventFiltering


>
> 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 in http://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 [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-wave-api%[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.

Reply via email to