Hallo!

I have some issues with blip.getParent in Java.

First what exactly should it return? There are childs of blips (Blips
on the same discussion level in Wave) and responses to a blip (which
are on a lower level in the wave).
How do i distinguish that in the robot API? There is only a
blip.createChild() and a blip.getParent() method. Or is the creation
of a new hierachy not possible from the robot?

The second problem i have is that i always get just the "blip" with
the headline of the wave as parent back. No matter where in the
discussion the blip is.
Here is my code to that:

    @Override
    public void processEvents(RobotMessageBundle bundle) {
        Wavelet wavelet = bundle.getWavelet();

        for (Event e: bundle.getEvents()) {
                if(e.getType() == EventType.BLIP_SUBMITTED)
                {
                        Blip blip = e.getBlip();
                        TextView textView  = blip.getDocument();
                        String text = textView.getText();
                        if(text.contains("!debug"))
                        {
                                if(blip.isParentAvailable())
                                {
                                    Blip parent = blip.getParent();
                                    TextView tv = parent.getDocument();
                                    tv.append("parent!");
                                }
                                else
                                        blip.getDocument().append("No Parent");
                        }
                }
        }
    }

And my capabilities.xml:
Here i have no clue what the context actually should contain? i tried
true and parent. did not change anything.

<?xml version="1.0" encoding="utf-8"?>
<w:robot xmlns:w="http://wave.google.com/extensions/robots/1.0";>
  <w:capabilities>
    <w:capability name="WAVELET_PARTICIPANTS_CHANGED" />
    <w:capability name="BLIP_SUBMITTED" content="true"
context="truer"/>
  </w:capabilities>
  <w:version>1</w:version>
</w:robot>

--

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.


Reply via email to